January 29, 2015
On Thursday, 29 January 2015 at 19:49:58 UTC, Jacob Carlborg wrote:
> On 2015-01-29 18:17, deadalnix wrote:
>
>> And it is so bad when the codebase grows that people are willing
>> to switch to Node.js (!)
>
> And still people are using it successfully.

Yes, my point is that there is tradeof.

This is easy to build something fast in ruby, but this becomes unmaintainable at scale. I'm not sure this is the tradeof we want in D.
January 29, 2015
On 1/29/2015 6:00 AM, Jacob Carlborg wrote:
> On 2015-01-29 01:19, Walter Bright wrote:
>
>> One of the other mistakes they make is the great idea of implicit
>> declaration of variables, and then ruefully have to deprecate/remove it
>> a year or two later. (How could those experienced designers have missed
>> this obviously great feature?!?)
>
> Ruby has implicit declaration of variables. Ruby it has been around longer than
> D and are used by far, far more developers.

"Some languages have started out with the implicit declaration behavior, but as they matured they provided an option to disable it (e.g. Perl's "use strict" or Visual Basic's "Option Explicit")."

   -- http://en.wikipedia.org/wiki/Declaration_(computer_programming)#Variables

Ruby also has monkey patching, another misfeature.

Even so, lots of languages survive execrable features if they are counterbalanced by more desirable one.
January 29, 2015
On 1/29/2015 5:58 AM, Jacob Carlborg wrote:
> On 2015-01-28 23:27, Walter Bright wrote:
>
>> For example, people often realize that the ; statement terminator is
>> redundant, so they propose removing it. In trying it, however, it soon
>> becomes clear that error message clarity, recovery, and the correct
>> identification of the location of the error degrades substantially.
>>
>> So consider:
>>
>>      void func()
>>      safe T = 7;
>>
>> With your proposal, an error isn't discovered until the '=' is found.
>
> A good language design that doesn't require the ; statement terminator would
> recognize "void func()" as a valid statement and implicit add ;. Scan the line,
> if a valid language construct has been seen at the end of the line, insert a ;,
> if not continue to the next line. That works in many languages.


Oh, I know it can be made to work. That wasn't my point, which I shall repeat:

"error message clarity, recovery, and the correct identification of the location of the error degrades substantially"

Notice that your comment is still relying on remaining redundancy to try to figure out where the ; is supposed to go.
January 29, 2015
On Thursday, January 29, 2015 13:47:47 Walter Bright via Digitalmars-d wrote:
> Even so, lots of languages survive execrable features if they are counterbalanced by more desirable one.

C!

- Jonathan M Davis

January 30, 2015
On 2015-01-29 22:47, Walter Bright wrote:

> Ruby also has monkey patching, another misfeature.

It works great, have you actually used it? The entire Rails plugin system is built around monkey patching. It's far more successful than any D project.

-- 
/Jacob Carlborg
January 30, 2015
On 2015-01-29 22:02, ketmar wrote:

> this never worked good. see deadalnix. or:
>
>    foo.bar
>      .zed
>

In Ruby ".zed" is not valid code, so in Ruby it means:

foo.bar.zed;

In D it, with my rules, it would mean:

foo.bar;
.zed;

In D you would need to write:

foo.bar.
  zed

-- 
/Jacob Carlborg
January 30, 2015
On 2015-01-29 22:50, Walter Bright wrote:

> "error message clarity, recovery, and the correct identification of the
> location of the error degrades substantially"

I never had problems with the error messages in Ruby. But I do have had problems with them in D. Example:

int a = 3


int b = 4;

The compiler will complain there's a missing semicolon on line 4 in front of "int". The user has most likely forget to add the semicolon at the end of the first line.

> Notice that your comment is still relying on remaining redundancy to try
> to figure out where the ; is supposed to go.

You need some kind of separation between the statements. In Ruby a newline works as a statement separator.

-- 
/Jacob Carlborg
January 30, 2015
On Friday, 30 January 2015 at 09:27:09 UTC, Jacob Carlborg wrote:
> You need some kind of separation between the statements. In Ruby a newline works as a statement separator.

I think Go actually injects ";" in the lexer on tokens that can end statements if the token is followed by newline. Sounds crazy, but it works for that grammar.

January 30, 2015
On 1/30/2015 1:27 AM, Jacob Carlborg wrote:
> In Ruby a newline works as a statement separator.

Making it not an example of what I was talking about.
January 30, 2015
On Friday, 30 January 2015 at 09:21:17 UTC, Jacob Carlborg wrote:
> On 2015-01-29 22:47, Walter Bright wrote:
>
>> Ruby also has monkey patching, another misfeature.
>
> It works great, have you actually used it? The entire Rails plugin system is built around monkey patching. It's far more successful than any D project.

I have to agree with Jacob. It's an extremely powerful tool. It's used for things that D would use templating, introspection, CTFE and mixins for. Of course, each of these has its disadvantages, but that doesn't make them misfeatures at all. Unlike real misfeatures, the chance that someone uses them (or monkey patching) by accident and unintentionally is low.
14 15 16 17 18 19 20 21 22 23 24
Next ›   Last »