[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Proposal for a standard way of defining custom operators in Lua
- From: Coda Highland <chighland@...>
- Date: Wed, 24 Jul 2013 11:25:56 -0700
On Wed, Jul 24, 2013 at 11:09 AM, Sean Conner <firstname.lastname@example.org> wrote:
>> I totally agree that when this feature gets out of control and everyone
>> starts implementing his own cryptic operators, then it may lead to a
>> disaster. But I also think that any feature of the language, when it is
>> misused, could result in a lot of problems. And I'm not sure that
>> operaor overloading specifically is very special in this regard. After
>> all, many people seem to like Moonscript & the like due to a new syntax
>> and operators that it introduces, which may be an indication that current
>> syntax of Lua is a bit too verbose (or too low-level, if you wish) for
>> some people. Also many people programming in Java (which is also
>> intentionally a bit minimalistic when it comes to syntax, because Sun
>> wanted Java to be a "C for JVM") are now trying to escape to more
>> expressive languages running on JVM, e.g. Scala, Groovy, Kotlin and many,
>> many others. Of course, all that happens due to lack of expressiveness or
>> too much verbosity in the original language, and not due to user-defined
>> operators only.
> I don't mind verbosity---I think minimalism is overrated (APL anyone? How
> about Forth?). I suspect minimalism comes from programmers hating to type
> rather than any notions of purity (one friend knew a programmer who
> literally would cut-n-paste, even individual letters, because he disliked
There's a difference between minimalism in names and minimalism in design.
Minimalism in names is fairly irrelevant in modern systems -- with
code completion being an available option, self-documenting code is
typically more valuable than terse code. Now of course verbosity can
go overboard (I HATE coding in Objective-C because of the absolutely
absurd level of verbosity -- C++'s "str3 = str1 + str2;" vs. ObjC's
"str3 = [str1 stringByAppendingString:str2];" is a MILD example) but
for the most part the only limit is keeping it readable.
Minimalism in DESIGN is a completely different beast. It's not always
the right thing for the job -- after all, sometimes you WANT the
batteries to be included -- but there is nothing wrong with taking a
stance of minimalist purity for a given project if that fits the
design goals. Minimalism in design allows for a system to be kept
elegant, simple, and manageable.
Don't bring up one in arguments about the other.