www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Designing a consistent language is *very* hard

reply "Guillaume Chatelet" <chatelet.guillaume gmail.com> writes:
Sorry for the noise but I think a few language designer out there 
might like this one :
http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

I think Walter and Andrei will smile ( or cry ) reading it.
It's no trolling here, I do think this post is very valuable and 
relevant from a language design perspective.
Apr 28 2012
next sibling parent reply Paulo Pinto <pjmlp progtools.org> writes:
Am 28.04.2012 10:18, schrieb Guillaume Chatelet:
 Sorry for the noise but I think a few language designer out there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable and
 relevant from a language design perspective.
Well, I cry everytime I am using it on my web site, but the effort to port the scripts is not worth it.
Apr 28 2012
parent reply "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"Paulo Pinto" <pjmlp progtools.org> wrote in message 
news:jngarb$14un$1 digitalmars.com...
 Am 28.04.2012 10:18, schrieb Guillaume Chatelet:
 Sorry for the noise but I think a few language designer out there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable and
 relevant from a language design perspective.
Well, I cry everytime I am using it on my web site, but the effort to port the scripts is not worth it.
Abandoning PHP is *always* "worth it".
Apr 28 2012
parent reply "Paulo Pinto" <pjmlp progtools.org> writes:
On Saturday, 28 April 2012 at 09:41:06 UTC, Nick Sabalausky wrote:
 "Paulo Pinto" <pjmlp progtools.org> wrote in message
 news:jngarb$14un$1 digitalmars.com...
 Am 28.04.2012 10:18, schrieb Guillaume Chatelet:
 Sorry for the noise but I think a few language designer out 
 there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable 
 and
 relevant from a language design perspective.
Well, I cry everytime I am using it on my web site, but the effort to port the scripts is not worth it.
Abandoning PHP is *always* "worth it".
Rewriting seldom brings anything new. It almost like starting from zero, without the benefit from all the bug fixes the software has had along the years. The hours wasted porting to a new language, could be used adding features to existing code base, or refactoring. I know how I am speaking about, many of the big bucks we get on consultancy jobs, are from companies that decide to keep rewriting their software on the flavour of the month framework, just because "everyone else is doing it". So I rather keep my "almost clean" PHP scripts running, as getting to the trouble of switching ISP just to be able to rewrite the site in a more sane language. -- Paulo
Apr 28 2012
next sibling parent reply "Era Scarecrow" <rtcvb32 yahoo.com> writes:
On Saturday, 28 April 2012 at 11:42:19 UTC, Paulo Pinto wrote:
 Rewriting seldom brings anything new. It almost like starting
 from zero, without the benefit from all the bug fixes the
 software has had along the years.

 The hours wasted porting to a new language, could be used adding
 features to existing code base, or refactoring.
There are times where a full re-write is better than keeping the old code. I'm rewriting my code for SmartMerger (TES3 project) from C to D, will probably be renamed to SmartMergeD). I'm getting stuck more and more adding and rewriting portions of code that are basically simple containers for different types; like associative arrays and array searching of different types. It is quite refreshing to see how compact and simpler the code is; And this is the first project I'm fully embracing OO. I can't wait to see how D will look as it matures and the compiler gets to a fully stable condition.
Apr 28 2012
parent "Paulo Pinto" <pjmlp progtools.org> writes:
On Saturday, 28 April 2012 at 12:32:17 UTC, Era Scarecrow wrote:
 On Saturday, 28 April 2012 at 11:42:19 UTC, Paulo Pinto wrote:
 Rewriting seldom brings anything new. It almost like starting
 from zero, without the benefit from all the bug fixes the
 software has had along the years.

 The hours wasted porting to a new language, could be used 
 adding
 features to existing code base, or refactoring.
There are times where a full re-write is better than keeping the old code. I'm rewriting my code for SmartMerger (TES3 project) from C to D, will probably be renamed to SmartMergeD). I'm getting stuck more and more adding and rewriting portions of code that are basically simple containers for different types; like associative arrays and array searching of different types. It is quite refreshing to see how compact and simpler the code is; And this is the first project I'm fully embracing OO. I can't wait to see how D will look as it matures and the compiler gets to a fully stable condition.
My statement is based in a few Fortune 500 projects, where I took part in the migration project. Some of those took several years to complete, and the only impact on the business was dropping the revenue. But I do concede, that there are use cases where it makes sense. -- Paulo
Apr 28 2012
prev sibling next sibling parent "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"Paulo Pinto" <pjmlp progtools.org> wrote in message 
news:oughgmvgoiiietkedaxa forum.dlang.org...
 On Saturday, 28 April 2012 at 09:41:06 UTC, Nick Sabalausky wrote:
 "Paulo Pinto" <pjmlp progtools.org> wrote in message
 news:jngarb$14un$1 digitalmars.com...
 Well, I cry everytime I am using it on my web site, but the effort to
 port the scripts is not worth it.
Abandoning PHP is *always* "worth it".
Rewriting seldom brings anything new. It almost like starting from zero, without the benefit from all the bug fixes the software has had along the years.
Well, rewriting != porting.
 The hours wasted porting to a new language, could be used adding
 features to existing code base, or refactoring.
I had a big project recently that was about half Flash. About halfway through, I ported all the Flash from AS2 to Haxe (and switched the resource-embedding from the Flash IDE to swfmill): It wasn't particularly difficult, and it more than paid off in the end.
 I know how I am speaking about, many of the big bucks we get on
 consultancy jobs, are from companies that decide to keep rewriting
 their software on the flavour of the month framework, just because
 "everyone else is doing it".
Well, yea, *that* would certainly be a problem. And I agree there are times when porting languages is not worth it. But I do have a very hard time imagining that porting away from PHP could ever be unworthwhile. I'm not trying to talk you into porting your stuff, though. Just sayin'.
 So I rather keep my "almost clean" PHP scripts running, as getting
 to the trouble of switching ISP just to be able to rewrite the site
 in a more sane language.
Eh, personally, I find the PHP-only webhosts to always be nightmares to deal with. Even the shared hosts that are nice enough allow native-compiled CGI still tend to be a pain. I switched to Linode (VPS) about a couple months ago, and I'm absolutely in love with it already. Heck, last night, I even got the thought in my head of converting one of my client's sites (that's hosted on a real shit PHP-only webhost) to my linode server, and just making their server proxy to mine (via PHP if I have to). I don't think I actually will, but it's a tempting thought (after all, I have gotten him to agree, at least in principle, to switching to shared host that allows native-compiled CGI). But I guess I'm rambling now. And YMMV, FWIW, Etc, OMGWTFBBQ...
Apr 28 2012
prev sibling parent reply "Dejan Lekic" <dejan.lekic gmail.com> writes:
On Saturday, 28 April 2012 at 11:42:19 UTC, Paulo Pinto wrote:
 On Saturday, 28 April 2012 at 09:41:06 UTC, Nick Sabalausky 
 wrote:
 "Paulo Pinto" <pjmlp progtools.org> wrote in message
 news:jngarb$14un$1 digitalmars.com...
 Am 28.04.2012 10:18, schrieb Guillaume Chatelet:
 Sorry for the noise but I think a few language designer out 
 there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable 
 and
 relevant from a language design perspective.
Well, I cry everytime I am using it on my web site, but the effort to port the scripts is not worth it.
Abandoning PHP is *always* "worth it".
Rewriting seldom brings anything new. It almost like starting from zero, without the benefit from all the bug fixes the software has had along the years. The hours wasted porting to a new language, could be used adding features to existing code base, or refactoring. I know how I am speaking about, many of the big bucks we get on consultancy jobs, are from companies that decide to keep rewriting their software on the flavour of the month framework, just because "everyone else is doing it". So I rather keep my "almost clean" PHP scripts running, as getting to the trouble of switching ISP just to be able to rewrite the site in a more sane language. -- Paulo
Nicely said. Precisely my experience. We are all Java programmers in my team, yet we maintain old ASP and PHP code that previous colleagues did in the past. Redoing them from scratch in Java or D is out of question. Speaking about PHP... I believe we all read that article. I could say worse about ASP than what that article says about PHP.
Aug 14 2013
parent reply "Tyler Jameson Little" <beatgammit gmail.com> writes:
On Wednesday, 14 August 2013 at 12:09:27 UTC, Dejan Lekic wrote:
 Speaking about PHP... I believe we all read that article. I 
 could say worse about ASP than what that article says about PHP.
That doesn't mean that ASP is worse than PHP though. PHP is so bad that I've actually considered offering up my time pro-bono to rewrite sites written in PHP to pretty much anything else. The only thing that excites me more than seeing PHP die is seeing IE6/7/8 die, and that's already happening. =D
Aug 14 2013
parent reply "deadalnix" <deadalnix gmail.com> writes:
On Thursday, 15 August 2013 at 01:56:09 UTC, Tyler Jameson Little 
wrote:
 On Wednesday, 14 August 2013 at 12:09:27 UTC, Dejan Lekic wrote:
 Speaking about PHP... I believe we all read that article. I 
 could say worse about ASP than what that article says about 
 PHP.
That doesn't mean that ASP is worse than PHP though. PHP is so bad that I've actually considered offering up my time pro-bono to rewrite sites written in PHP to pretty much anything else. The only thing that excites me more than seeing PHP die is seeing IE6/7/8 die, and that's already happening. =D
That would change much, we would still have Objective C and JS. And you know that everything MUST be done in JS !
Aug 14 2013
parent reply "Joakim" <joakim airpost.net> writes:
On Thursday, 15 August 2013 at 01:59:49 UTC, deadalnix wrote:
 On Thursday, 15 August 2013 at 01:56:09 UTC, Tyler Jameson 
 Little wrote:
 On Wednesday, 14 August 2013 at 12:09:27 UTC, Dejan Lekic 
 wrote:
 Speaking about PHP... I believe we all read that article. I 
 could say worse about ASP than what that article says about 
 PHP.
That doesn't mean that ASP is worse than PHP though. PHP is so bad that I've actually considered offering up my time pro-bono to rewrite sites written in PHP to pretty much anything else. The only thing that excites me more than seeing PHP die is seeing IE6/7/8 die, and that's already happening. =D
That would change much, we would still have Objective C and JS. And you know that everything MUST be done in JS !
Heh, at my job last year, one guy was duplicating significant business logic in javascript in the browser, that was already on the server, so that GUI lag was lessened. This blew my mind as I thought it should have been done in AJAX, so that business logic stayed on the server, as keeping the logic synced would probably get hairy, even though AJAX is not going to be _as_ fast as local javascript. But there were lots of other problems at that job, and he was so far from the worst of it, that I just looked at him like he was crazy and moved on. :) You mention Obj-C: how bad is it? I don't frequent Apple sites and nobody really talks about it in my orbit. I figure it must be pretty bad since it was designed decades ago and hasn't been updated much, but I'd like to hear what exactly it gets wrong.
Aug 15 2013
next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-08-15 12:51, Joakim wrote:

 You mention Obj-C: how bad is it?  I don't frequent Apple sites and
 nobody really talks about it in my orbit.  I figure it must be pretty
 bad since it was designed decades ago and hasn't been updated much, but
 I'd like to hear what exactly it gets wrong.
It has quite an ugly syntax for the calling and declaring methods. Apple has updated it quite a lot in recent years. It's getting better and better each year. Some recent changes: * Modules * No need for forward references (at least not for methods) * New object literals * Fast enumeration (quite old) * A simple variant of operator overloading * Automatically synthesizing of properties Plus a bunch of other things I can't remember right now. I like the object model and it's dynamic nature. It's easy to call a method via a selector (string). -- /Jacob Carlborg
Aug 15 2013
prev sibling parent Peter Williams <pwil3058 bigpond.net.au> writes:
On 15/08/13 20:51, Joakim wrote:
 On Thursday, 15 August 2013 at 01:59:49 UTC, deadalnix wrote:
 On Thursday, 15 August 2013 at 01:56:09 UTC, Tyler Jameson Little wrote:
 On Wednesday, 14 August 2013 at 12:09:27 UTC, Dejan Lekic wrote:
 Speaking about PHP... I believe we all read that article. I could
 say worse about ASP than what that article says about PHP.
That doesn't mean that ASP is worse than PHP though. PHP is so bad that I've actually considered offering up my time pro-bono to rewrite sites written in PHP to pretty much anything else. The only thing that excites me more than seeing PHP die is seeing IE6/7/8 die, and that's already happening. =D
That would change much, we would still have Objective C and JS. And you know that everything MUST be done in JS !
Heh, at my job last year, one guy was duplicating significant business logic in javascript in the browser, that was already on the server, so that GUI lag was lessened. This blew my mind as I thought it should have been done in AJAX, so that business logic stayed on the server, as keeping the logic synced would probably get hairy, even though AJAX is not going to be _as_ fast as local javascript. But there were lots of other problems at that job, and he was so far from the worst of it, that I just looked at him like he was crazy and moved on. :) You mention Obj-C: how bad is it? I don't frequent Apple sites and nobody really talks about it in my orbit. I figure it must be pretty bad since it was designed decades ago and hasn't been updated much, but I'd like to hear what exactly it gets wrong.
It's pretty ugly. But at least it's not C++. Peter
Aug 15 2013
prev sibling next sibling parent reply "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"Guillaume Chatelet" <chatelet.guillaume gmail.com> wrote in message 
news:vwpzirpppabcgylmvpsx forum.dlang.org...
 Sorry for the noise but I think a few language designer out there might 
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
"PHP: a fractal of bad design" is the absolute most perfect summary of PHP anyone could ever possibly make. It is the world's worst still-living non-joke language, period. Although, I genuinely cringe at calling it a "non-joke" language. Or "living" - PHP is like one of those botched homunculi from Fullmetal Alchemist, writhing around in an unholy half-existence. Even if you use something like Haxe-compiled-to-PHP to escape the language itself, you've still only escaped part of PHP's gruesome hell. His sections "An Analogy" through "Core Language" are absolute spot-on perfection. One of my (many) favorite quotes here is "PHP is a community of amateurs". So very, very true. Speaking of which, the fact that they botched the PHP4 -> PHP5 transition so completely, when there were obvious trivial ways to handle it sensibly, has always been my personal favorite evidence of PHP's extreme amaterishness. I couldn't bear to get even as far as half-way through this tome, but I do have this to say about it: I hope I *never* end up knowing anywhere near as much about PHP as this guy is cursed to know. With each passing day, I grow more and more convinced: The true measure of a web developer is how much they hate PHP. (Note: Not intended self-referentially - No narcissism implied.)
Apr 28 2012
next sibling parent "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> wrote in message 
news:jngd63$18m1$1 digitalmars.com...
 With each passing day, I grow more and more convinced: The true measure of 
 a web developer is how much they hate PHP. (Note: Not intended 
 self-referentially - No narcissism implied.)
Actually, what I really meant was: The true measure of a web developer is how much they hate web technologies. (PHP, of coruse, being a fairly major part of that.) There does always seem to be an inverse correlation between a web developer's abilities and their opinion of popular web technologies.
Apr 28 2012
prev sibling parent reply deadalnix <deadalnix gmail.com> writes:
Le 28/04/2012 11:27, Nick Sabalausky a écrit :
 "Guillaume Chatelet"<chatelet.guillaume gmail.com>  wrote in message
 news:vwpzirpppabcgylmvpsx forum.dlang.org...
 Sorry for the noise but I think a few language designer out there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
"PHP: a fractal of bad design" is the absolute most perfect summary of PHP anyone could ever possibly make. It is the world's worst still-living non-joke language, period.
Please note that Rasmus Ledorf stated many time that He « don't know how to design a programming language », « never intended to create a programing language », « don't like programing » and probably the funniest one « don't how to stop it » it being the success of PHP. Back on the article, the author is wrong when stating that it isn't possible to run several different versions of PHP on the same server. This is possible, I did it several times and for big websites.
Apr 28 2012
parent "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"deadalnix" <deadalnix gmail.com> wrote in message 
news:jngirs$1jlf$1 digitalmars.com...
 Le 28/04/2012 11:27, Nick Sabalausky a écrit :
 "Guillaume Chatelet"<chatelet.guillaume gmail.com>  wrote in message
 news:vwpzirpppabcgylmvpsx forum.dlang.org...
 Sorry for the noise but I think a few language designer out there might
 like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
"PHP: a fractal of bad design" is the absolute most perfect summary of PHP anyone could ever possibly make. It is the world's worst still-living non-joke language, period.
Please note that Rasmus Ledorf stated many time that He « don't know how to design a programming language », « never intended to create a programing language », « don't like programing » and probably the funniest one « don't how to stop it » it being the success of PHP.
Ugh. That just makes the whole situation even more pathetic.
Apr 28 2012
prev sibling next sibling parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sat, Apr 28, 2012 at 10:18:33AM +0200, Guillaume Chatelet wrote:
 Sorry for the noise but I think a few language designer out there
 might like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/
 
 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable and
 relevant from a language design perspective.
I've written some simple apps in PHP... never learned enough of it to run into all the problems listed on that page. But I *did* run into stupidities involving ===. IMNSHO, *any* language that has === is fundamentally, irreparably dainbramaged, and needs to be scrapped and redesigned from scratch. This includes that hellspawn of evil incarnate known as Javascript. After reading this article, I'm seriously considering adopting D as my language of choice for CGI. ;-) T -- "Computer Science is no more about computers than astronomy is about telescopes." -- E.W. Dijkstra
Apr 28 2012
next sibling parent "Adam D. Ruppe" <destructionator gmail.com> writes:
On Saturday, 28 April 2012 at 15:43:52 UTC, H. S. Teoh wrote:
 After reading this article, I'm seriously considering adopting 
 D as my language of choice for CGI. ;-)
D rox.
Apr 28 2012
prev sibling next sibling parent reply "David Nadlinger" <see klickverbot.at> writes:
On Saturday, 28 April 2012 at 15:43:52 UTC, H. S. Teoh wrote:
 IMNSHO, *any* language that has === is
 fundamentally, irreparably dainbramaged, and needs to be 
 scrapped and
 redesigned from scratch.
Well, in D we have "is", so… (/me ducks) David
Apr 28 2012
parent reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sat, Apr 28, 2012 at 06:19:44PM +0200, David Nadlinger wrote:
 On Saturday, 28 April 2012 at 15:43:52 UTC, H. S. Teoh wrote:
IMNSHO, *any* language that has === is fundamentally, irreparably
dainbramaged, and needs to be scrapped and redesigned from scratch.
Well, in D we have "is", so… (/me ducks)
[...] To be frank, I find the various syntaxes of 'is' very inconsistent and jarring. It has elicited several WATs from me while learning D. There's no question that the various *uses* to which the syntax has been assigned is extremely useful, but the syntax itself could do with a redesign. I mean, first you have: is(A==B) is the type A is equal to the type B If it were up to me, I'd have used instead the syntax: A==B since, after all, A and B are already known to be types. Then you have: is(A : B) is the type A implicitly convertible to B OK, not the best thing, but at least type comparisons are consistently done in is() syntax, so it's partly palatable. Using : for implicit convertibility is questionable, but at least there's an analogy with base class syntax. So OK. But then: is(A B) if type A is a valid type, alias it to B WAT? There's absolutely no correspondence between this syntax and the previous two cases. NOBODY reading this code would be able to guess its meaning unless they have already learnt the syntax. (Nobody would guess what that piece of PHP code does unless they have already memorized its meaning.) Worse, you have: is(A B : C[D]) if type A is the same as (or is a subclass of) some kind of associative array OK, there's no doubt the *meaning* of this construct is extremely useful, but seriously, the syntax is just as bad as PHP's predisposition to unexpected exceptions to arbitrary rules. Then you have the overload of 'is' to mean a pointer comparison operator: A is B if A and B point to the same thing This I can accept, since with D's implicit pointer deferencing, you'd expect == to compare values, so when you want to compare identity (i.e. are these two references pointing to one and the same thing?) you do need a different syntax for it. But the overload of 'is' as an operator with 'is()' as an expression (and its various ugly arbitrarily assigned syntaxes)? WAT. Seriously, one of the first things I'd like to see in D3 is a complete overhaul of is(). I say again, the various *semantics* of it are extremely useful, and are part of what makes D rock so much. But the *syntax* badly needs a total redesign. We need much saner syntax assigned to each of the current uses of is(), that doesn't look like it was grafted in from a PHP development branch. T -- Life is unfair. Ask too much from it, and it may decide you don't deserve what you have now either.
Apr 28 2012
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 4/28/2012 11:10 AM, H. S. Teoh wrote:
 But the overload of 'is' as an operator with 'is()' as an expression
 (and its various ugly arbitrarily assigned syntaxes)? WAT.
It's not that unusual for an operator to have a binary form that is totally different from its unary form. Like *
 Seriously, one of the first things I'd like to see in D3 is a complete
 overhaul of is(). I say again, the various *semantics* of it are
 extremely useful, and are part of what makes D rock so much. But the
 *syntax* badly needs a total redesign. We need much saner syntax
 assigned to each of the current uses of is(), that doesn't look like it
 was grafted in from a PHP development branch.
I agree that the IsExpression syntax is a bit of a disaster. Eventually we can redesign it (D3), but there's no way we have time to do that now.
Apr 28 2012
next sibling parent reply "q66" <quaker66 gmail.com> writes:
On Saturday, 28 April 2012 at 18:43:32 UTC, Walter Bright wrote:
 On 4/28/2012 11:10 AM, H. S. Teoh wrote:
 But the overload of 'is' as an operator with 'is()' as an 
 expression
 (and its various ugly arbitrarily assigned syntaxes)? WAT.
It's not that unusual for an operator to have a binary form that is totally different from its unary form. Like *
 Seriously, one of the first things I'd like to see in D3 is a 
 complete
 overhaul of is(). I say again, the various *semantics* of it 
 are
 extremely useful, and are part of what makes D rock so much. 
 But the
 *syntax* badly needs a total redesign. We need much saner 
 syntax
 assigned to each of the current uses of is(), that doesn't 
 look like it
 was grafted in from a PHP development branch.
I agree that the IsExpression syntax is a bit of a disaster. Eventually we can redesign it (D3), but there's no way we have time to do that now.
So .. D3 is coming? *runs*
Apr 28 2012
next sibling parent deadalnix <deadalnix gmail.com> writes:
Le 28/04/2012 21:27, q66 a écrit :
 On Saturday, 28 April 2012 at 18:43:32 UTC, Walter Bright wrote:
 On 4/28/2012 11:10 AM, H. S. Teoh wrote:
 But the overload of 'is' as an operator with 'is()' as an expression
 (and its various ugly arbitrarily assigned syntaxes)? WAT.
It's not that unusual for an operator to have a binary form that is totally different from its unary form. Like *
 Seriously, one of the first things I'd like to see in D3 is a complete
 overhaul of is(). I say again, the various *semantics* of it are
 extremely useful, and are part of what makes D rock so much. But the
 *syntax* badly needs a total redesign. We need much saner syntax
 assigned to each of the current uses of is(), that doesn't look like it
 was grafted in from a PHP development branch.
I agree that the IsExpression syntax is a bit of a disaster. Eventually we can redesign it (D3), but there's no way we have time to do that now.
So .. D3 is coming? *runs*
I think it is too soon for D3, but at some point, breaking changes will have to be introduced.
Apr 28 2012
prev sibling next sibling parent Walter Bright <newshound2 digitalmars.com> writes:
On 4/28/2012 12:27 PM, q66 wrote:
 So .. D3 is coming? *runs*
Not anytime soon.
Apr 28 2012
prev sibling parent Jonathan M Davis <jmdavisProg gmx.com> writes:
On Saturday, April 28, 2012 21:27:28 q66 wrote:
 So .. D3 is coming? *runs*
I think that the last time that Andrei mentioned anything about D3, he said something about maybe 10 years from now. Certainly, if we were to embark on D3 now, we'd just hamstring D2 and probably kill it. Once D2 is fully stable and well-established, we can look at what's worked with it and what hasn't and look at creating a new iteration of the language. But doing that before D2 is fully stable is suicide. We're taking long enough to reach that _without_ doing does of feature changes. We can probably add backwards-compatible features later on, but for now, the focus needs to be on stabilizing what we have, and we _definitely_ don't want to completely redesign any aspects of the language at this point. - Jonathan M Davis
Apr 28 2012
prev sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Sat, Apr 28, 2012 at 11:42:47AM -0700, Walter Bright wrote:
 On 4/28/2012 11:10 AM, H. S. Teoh wrote:
But the overload of 'is' as an operator with 'is()' as an expression
(and its various ugly arbitrarily assigned syntaxes)? WAT.
It's not that unusual for an operator to have a binary form that is totally different from its unary form. Like *
So the 'is' in 'is()' is an _operator_? WAT? That's like saying the 'f' in 'f(1,2,3)' is an operator. I thought it was the '(1,2,3)' that was the operator that calls the function f.
Seriously, one of the first things I'd like to see in D3 is a
complete overhaul of is(). I say again, the various *semantics* of it
are extremely useful, and are part of what makes D rock so much. But
the *syntax* badly needs a total redesign. We need much saner syntax
assigned to each of the current uses of is(), that doesn't look like
it was grafted in from a PHP development branch.
I agree that the IsExpression syntax is a bit of a disaster. Eventually we can redesign it (D3), but there's no way we have time to do that now.
I'm not suggesting that we do that now. :-) But it *is* a disaster, and when the time comes for D3, whenever that may be, it definitely needs an overhaul. T -- Life is too short to run proprietary software. -- Bdale Garbee
Apr 28 2012
prev sibling parent "Nick Sabalausky" <SeeWebsiteToContactMe semitwist.com> writes:
"H. S. Teoh" <hsteoh quickfur.ath.cx> wrote in message 
news:mailman.45.1335627900.24740.digitalmars-d puremagic.com...
 On Sat, Apr 28, 2012 at 10:18:33AM +0200, Guillaume Chatelet wrote:
 Sorry for the noise but I think a few language designer out there
 might like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable and
 relevant from a language design perspective.
I've written some simple apps in PHP... never learned enough of it to run into all the problems listed on that page. But I *did* run into stupidities involving ===. IMNSHO, *any* language that has === is fundamentally, irreparably dainbramaged, and needs to be scrapped and redesigned from scratch. This includes that hellspawn of evil incarnate known as Javascript.
So true.
 After reading this article, I'm seriously considering adopting D as my
 language of choice for CGI. ;-)
I've already been sold on it for quite some time. Unfortunately, my biggest, most important web project is built in Haxe that's compiled down to *both* PHP and Flash, so I can't realistically switch until I have a way to keep the common server/client code *common*, without dupicating it in two different langauges for client and server (hence, my HaxeD project). Being able to have a common codebase for client/server is seriously such a killer feature, or at least it has been for my particular project.
Apr 28 2012
prev sibling parent "Joakim" <joakim airpost.net> writes:
On Saturday, 28 April 2012 at 08:18:34 UTC, Guillaume Chatelet 
wrote:
 Sorry for the noise but I think a few language designer out 
 there might like this one :
 http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

 I think Walter and Andrei will smile ( or cry ) reading it.
 It's no trolling here, I do think this post is very valuable 
 and relevant from a language design perspective.
Bump. Nick linked this blog post in another thread and after nosing around his blog, I found another good blog post the guy wrote earlier this year: http://me.veekun.com/blog/2013/03/03/the-controller-pattern-is-awful-and-other-oo-heresy/ This could be an important strength to highlight in D, since it doesn't have the OO constraints that Java imposes. Although, I have run into this problem myself when poking around a D project filled with OO boilerplate, with the single function that actually did anything hidden away in a private method in some unexpected class. Perhaps it's because the project was still being written and the author found it easier to write all his class superstructure first, but I suspect even the finished project had far too much of this OO debris. The problems of that project can't be blamed on D of course, but that unfortunate mentality seeps in from other languages, which hopefully blog posts like this and better idiomatic D can combat.
Aug 14 2013