Re: consequences of removing semicolons in D like in Python

2016-09-22 Thread Chris via Digitalmars-d
On Thursday, 22 September 2016 at 14:36:31 UTC, eugene wrote: On Thursday, 22 September 2016 at 14:07:29 UTC, Chris wrote: What about braces and brackets? debug { writeln("Error") } i think writeln("Error") could be parsed as one statement I think so too, and `debug {}` too.

Re: consequences of removing semicolons in D like in Python

2016-09-22 Thread eugene via Digitalmars-d
On Thursday, 22 September 2016 at 14:07:29 UTC, Chris wrote: What about braces and brackets? debug { writeln("Error") } i think writeln("Error") could be parsed as one statement

Re: consequences of removing semicolons in D like in Python

2016-09-22 Thread Chris via Digitalmars-d
On Thursday, 22 September 2016 at 13:44:33 UTC, eugene wrote: On Tuesday, 20 September 2016 at 15:42:10 UTC, Chris wrote: ¿How would you handle cases like debug { writeln("Error"); return; } of just debug { writeln("Error"); } it is handled by separating each statement with newline, not

Re: consequences of removing semicolons in D like in Python

2016-09-22 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 15:42:10 UTC, Chris wrote: ¿How would you handle cases like debug { writeln("Error"); return; } of just debug { writeln("Error"); } it is handled by separating each statement with newline, not semicolon

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread jmh530 via Digitalmars-d
On Tuesday, 20 September 2016 at 15:36:42 UTC, Chris wrote: Then try to compile Phobos and a variety of D projects on Github and publish the results. It'd be interesting to see what problems you encounter. Then you might write a tool like dfix that fixes the source code so that ";"-less code

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Chris via Digitalmars-d
On Tuesday, 20 September 2016 at 15:53:20 UTC, eugene wrote: On Tuesday, 20 September 2016 at 15:46:58 UTC, Chris wrote: You come across as if you had set your heart on removing semicolons. i didn't set my heart on removing semicolons, the topic is "consequences of removing semicolons..."

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 15:46:58 UTC, Chris wrote: You come across as if you had set your heart on removing semicolons. i didn't set my heart on removing semicolons, the topic is "consequences of removing semicolons..."

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Chris via Digitalmars-d
On Tuesday, 20 September 2016 at 15:42:58 UTC, eugene wrote: On Tuesday, 20 September 2016 at 15:36:42 UTC, Chris wrote: But is it really worth it? this was my question at the beginning of the thread You come across as if you had set your heart on removing semicolons.

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 15:36:42 UTC, Chris wrote: But is it really worth it? this was my question at the beginning of the thread

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Chris via Digitalmars-d
On Tuesday, 20 September 2016 at 15:36:42 UTC, Chris wrote: On Tuesday, 20 September 2016 at 15:31:21 UTC, eugene wrote: On Tuesday, 20 September 2016 at 15:28:51 UTC, Chris wrote: Anyway, why don't you grab the compiler and make a version that accepts line breaks and ";" - and see what

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Chris via Digitalmars-d
On Tuesday, 20 September 2016 at 15:31:21 UTC, eugene wrote: On Tuesday, 20 September 2016 at 15:28:51 UTC, Chris wrote: Anyway, why don't you grab the compiler and make a version that accepts line breaks and ";" - and see what happens? yes, i've written about it in the thread before Then

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 15:28:51 UTC, Chris wrote: Anyway, why don't you grab the compiler and make a version that accepts line breaks and ";" - and see what happens? yes, i've written about it in the thread before

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Chris via Digitalmars-d
On Tuesday, 20 September 2016 at 15:07:31 UTC, eugene wrote: one doesn't parse a sentence when one reads it, one translates a sentence into images; why do you compare native speech sentences with a programming language statements? one doesn't parse a sentence when one reads it one

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 14:19:50 UTC, Nick Sabalausky wrote: Just like you parse a sentence when you read it by noticing the spaces defining where words are. And the commas separating sections of a sentence, and periods/capitalization separating the sentences, in-sentence

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread Nick Sabalausky via Digitalmars-d
On 09/20/2016 08:20 AM, eugene wrote: On Tuesday, 20 September 2016 at 12:00:00 UTC, bachmeier wrote: Without the semicolons, I have to parse the code myself could you, please, explain, why do you parse code yourself? That's what happens in the brain when you read code. He's not talking

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Tuesday, 20 September 2016 at 12:00:00 UTC, bachmeier wrote: Without the semicolons, I have to parse the code myself could you, please, explain, why do you parse code yourself?

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread bachmeier via Digitalmars-d
On Tuesday, 20 September 2016 at 11:24:29 UTC, eugene wrote: On Monday, 19 September 2016 at 20:42:22 UTC, jmh530 wrote: I don't see a reason to make that sort of change within the D language or DMD, especially when something like Delight exists and probably accomplishes exactly what the OP

Re: consequences of removing semicolons in D like in Python

2016-09-20 Thread eugene via Digitalmars-d
On Monday, 19 September 2016 at 20:42:22 UTC, jmh530 wrote: I don't see a reason to make that sort of change within the D language or DMD, especially when something like Delight exists and probably accomplishes exactly what the OP had wanted. Delight is not what i meant, i meant something

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread Ali Çehreli via Digitalmars-d
On 09/17/2016 07:32 AM, Chris Wright wrote: python-style syntax a while back, in the D1 days, though I forget the name of it. http://delight.sourceforge.net/ Ali

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread jmh530 via Digitalmars-d
On Monday, 19 September 2016 at 20:22:00 UTC, Chris wrote: The thing is that there is no way of telling how much D code would break (including the compiler), if semicolons were removed or optional. That's too big of a gamble for a purely aesthetic change. I don't see a reason to make that

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread Chris via Digitalmars-d
On Monday, 19 September 2016 at 16:52:10 UTC, bpr wrote: On Saturday, 17 September 2016 at 16:43:13 UTC, Nick Sabalausky wrote: If semicolons are such a terrible drain, there's always JS and Python. For someone who likes D, Nim (http://www.nim-lang.org) would be better a choice for a

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread bpr via Digitalmars-d
On Saturday, 17 September 2016 at 16:43:13 UTC, Nick Sabalausky wrote: If semicolons are such a terrible drain, there's always JS and Python. For someone who likes D, Nim (http://www.nim-lang.org) would be better a choice for a language at the same level with Python like syntax. Changing D

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread bachmeier via Digitalmars-d
On Monday, 19 September 2016 at 15:13:10 UTC, Chris Wright wrote: On Mon, 19 Sep 2016 13:06:30 +, pineapple wrote: If you spend enough time writing Python, you will start to run into cases where meaningful whitespace makes it difficult to write readable, functional code. For the most

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread Chris Wright via Digitalmars-d
On Mon, 19 Sep 2016 13:06:30 +, pineapple wrote: > If you > spend enough time writing Python, you will start to run into cases where > meaningful whitespace makes it difficult to write readable, functional > code. For the most part, you can wrap a statement in parentheses in lieu of

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread pineapple via Digitalmars-d
On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? If you write JS in a professional environment, you will almost certainly be required to terminate every line with a

Re: consequences of removing semicolons in D like in Python

2016-09-19 Thread Kagamin via Digitalmars-d
On Saturday, 17 September 2016 at 14:47:38 UTC, eugene wrote: On Saturday, 17 September 2016 at 14:23:40 UTC, jmh530 wrote: What if the OP wrote a compiler that turned his version of D sans semicolons into proper D code? i didn't try to implement it myself, but i will try There's already a

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread ixid via Digitalmars-d
On Saturday, 17 September 2016 at 11:59:53 UTC, cym13 wrote: Note how a leading dot means “global scope” but a dot after something means UFCS or method/attribute. What should this program do? If it is akin to “auto i = [1, 2, 3]; .filterEven();” then i is an int[] and the program prints

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Nick Sabalausky via Digitalmars-d
On 09/17/2016 09:38 AM, eugene wrote: because a programmer will have a choice of writing or not semicolons, as one anyway presses "Enter" why not to use it as a line separator, and one who likes to type semicolons won't be confused if there is backward compatibility Other people have already

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread eugene via Digitalmars-d
On Saturday, 17 September 2016 at 14:23:40 UTC, jmh530 wrote: What if the OP wrote a compiler that turned his version of D sans semicolons into proper D code? i didn't try to implement it myself, but i will try

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Lodovico Giaretta via Digitalmars-d
On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? Another reason not listed in previous answers (or I didn't see it) is that D as a unique (AFAIK) capability: string

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Chris Wright via Digitalmars-d
On Sat, 17 Sep 2016 14:23:40 +, jmh530 wrote: > On Saturday, 17 September 2016 at 02:21:54 UTC, Chris M. wrote: >> On Friday, 16 September 2016 at 23:01:32 UTC, eugene wrote: >>> On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread jmh530 via Digitalmars-d
On Saturday, 17 September 2016 at 02:21:54 UTC, Chris M. wrote: On Friday, 16 September 2016 at 23:01:32 UTC, eugene wrote: On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Chris Wright via Digitalmars-d
On Sat, 17 Sep 2016 09:09:44 +, Sebastiaan Koppe wrote: > On Saturday, 17 September 2016 at 05:03:17 UTC, Chris Wright wrote: >> someObject.someField.someLongMethodName( >> arg1, arg2, arg3); > There are no semicolons in an ArgumentList. Thank you for repeating my point, that you have to

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread eugene via Digitalmars-d
On Saturday, 17 September 2016 at 13:33:49 UTC, Craig Dillabaugh wrote: On Saturday, 17 September 2016 at 13:18:24 UTC, eugene wrote: On Saturday, 17 September 2016 at 13:11:50 UTC, Nick Sabalausky wrote: On 09/16/2016 07:00 PM, eugene wrote: Hello everyone, what if to remove semicolons at

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Craig Dillabaugh via Digitalmars-d
On Saturday, 17 September 2016 at 13:18:24 UTC, eugene wrote: On Saturday, 17 September 2016 at 13:11:50 UTC, Nick Sabalausky wrote: On 09/16/2016 07:00 PM, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? Not

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread eugene via Digitalmars-d
On Saturday, 17 September 2016 at 13:11:50 UTC, Nick Sabalausky wrote: On 09/16/2016 07:00 PM, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? Not worth it. Gripes about semicolons are a symptom of only seeing

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Nick Sabalausky via Digitalmars-d
On 09/16/2016 07:00 PM, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? Not worth it. Gripes about semicolons are a symptom of only seeing the superficial and not really understanding enough about languages to see

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Bastiaan Veelo via Digitalmars-d
On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Is it worth it? This has been discussed at length in 2009. TLDR: It's not worth it. http://forum.dlang.org/post/hbo0h2$2ksb$1...@digitalmars.com

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread cym13 via Digitalmars-d
On Saturday, 17 September 2016 at 11:03:14 UTC, Jonathan M Davis wrote: On Saturday, September 17, 2016 10:15:57 eugene via Digitalmars-d wrote: On Saturday, 17 September 2016 at 02:21:54 UTC, Chris M. wrote: > Pointless and not worth breaking everyone's code over why? Having semicolons

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Jonathan M Davis via Digitalmars-d
On Saturday, September 17, 2016 10:15:57 eugene via Digitalmars-d wrote: > On Saturday, 17 September 2016 at 02:21:54 UTC, Chris M. wrote: > > Pointless and not worth breaking everyone's code over > > why? Having semicolons actually serves as a synchronization point for the compiler, which helps

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread eugene via Digitalmars-d
On Saturday, 17 September 2016 at 02:21:54 UTC, Chris M. wrote: Pointless and not worth breaking everyone's code over why?

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread Sebastiaan Koppe via Digitalmars-d
On Saturday, 17 September 2016 at 05:03:17 UTC, Chris Wright wrote: someObject.someField.someLongMethodName( arg1, arg2, arg3); There are no semicolons in an ArgumentList. You might look into how javascript does it and what weirdness ensues as a result. Its weird and uncomfortable at

Re: consequences of removing semicolons in D like in Python

2016-09-17 Thread tcak via Digitalmars-d
On Saturday, 17 September 2016 at 05:03:17 UTC, Chris Wright wrote: On Fri, 16 Sep 2016 23:00:08 +, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? It's more than reinterpreting newline as a semicolon. For

Re: consequences of removing semicolons in D like in Python

2016-09-16 Thread Chris Wright via Digitalmars-d
On Fri, 16 Sep 2016 23:00:08 +, eugene wrote: > Hello everyone, > what if to remove semicolons at the end of each line of code in D like > in Python? > Is it worth it? It's more than reinterpreting newline as a semicolon. For instance, we'd probably still want this to work:

Re: consequences of removing semicolons in D like in Python

2016-09-16 Thread rikki cattermole via Digitalmars-d
On 17/09/2016 11:00 AM, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? Also lua would be a better example as it allows for with and without.

Re: consequences of removing semicolons in D like in Python

2016-09-16 Thread Chris M. via Digitalmars-d
On Friday, 16 September 2016 at 23:01:32 UTC, eugene wrote: On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? i.e. simply use a newline sign as a line separator

Re: consequences of removing semicolons in D like in Python

2016-09-16 Thread eugene via Digitalmars-d
On Friday, 16 September 2016 at 23:00:08 UTC, eugene wrote: Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it? i.e. simply use a newline sign as a line separator

consequences of removing semicolons in D like in Python

2016-09-16 Thread eugene via Digitalmars-d
Hello everyone, what if to remove semicolons at the end of each line of code in D like in Python? Is it worth it?