Should sanity be a property of a programmer or a program?
Posted
by
toplel32
on Programmers
See other posts from Programmers
or by toplel32
Published on 2014-06-01T12:12:48Z
Indexed on
2014/06/02
9:50 UTC
Read the original article
Hit count: 182
programming-languages
|language-design
I design and implement languages, that can range from object notations to markup languages. In many cases I have considered restrictions in favor of sanity (common knowledge), like in the case of control characters in identifiers. There are two consequences to consider before doing this:
- It takes extra computation
- It narrows liberty
I'm interested to learn how developers think of decisions like this. As you may know Microsoft C# is very open on the contrary. If you really want to prefix your integer as Long with 'l' instead of 'L' and so risk other developers of confusing '1' and 'l', no problem. If you want to name your variables in non-latin script so they will contrast with C#'s latin keywords, no problem. Or if you want to distribute a string over multiple lines and so break a series of indentation, no problem.
It is cheap to ensure consistency with restrictions and this makes it tempting to implement. But in the case of disallowing non-latin characters (concerning the second example), it means a discredit to Unicode, because one would not take full advantage of its capacity.
© Programmers or respective owner