Hacker News new | ask | show | jobs
by SamReidHughes 2424 days ago
In many languages, you might use one for a type name, the other for a variable.

You could ban using the same identifier with different cases, instead of treating them the same.

2 comments

> In many languages, you might use one for a type name, the other for a variable.

And Nim is one of those languages too. This is perfectly valid and frequently used:

    type
      Person = object
        name: string
        age: int

    let person = Person(name: "you", age: 99)

    echo person

You can try it in Nim Playground: https://play.nim-lang.org/#ix=20jS
On the other hand, what if it's a code UI limitation? Suppose the UI for writing Nim had support for linking, editing, viewing all such alternately spelled but equivalent symbols?
There are tools that aren't nim-specific, like ack/grep/sed/git, and code review tools, which suffer as a result.
Then it limits me as a programmer to have to use said UI...