December 01, 2006
Witold Baryluk wrote:

> I also like Python's syntax, but i think small portion of D can be
> adapted to this syntax (if anyone like tabs, and if it will be used
> by anyone). I also think that people frustrated by Python syntax,
> simply have bad editor/configuration. Lots of editors now is not tabaware.

Nope, my editor handles it perfectly. I just find the indenting in Python to suck.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource & #D: larsivi
December 01, 2006
Leandro Lucarella wrote:
> Daniel Giddings escribió:
>> Get an editor that understands Python ;-) Most will either use whatever that code block uses, or highlight the problem indentation in bright red.
>>
>> Personally I much prefer the Python way of doing indentation, after all you indent your code anyway making the curly braces somewhat redundant (and I program about equally in C/C++ and Python).
> 
> And I found all the people who don't like indent blocks is people that doesn't use them for too long. Sure at first is horrible, shocking, but when you get used to, there's no way back.
> 
> Bracket (and sentence terminators) are syntactic noise[1].
> 
> [1] http://xlr.sourceforge.net/concept/synnoise.html
> 

A friend of mine spent four years or so of his life up to his waist in Python, as the maintainer and new feature developer of a popular bittorrent client.  (Trying to avoid names here... :))  When the original developer became interested in taking back his project, my friend was only too happy to give it to him and go back to C.

Personally, I only touched Python for about a year and a half and found it too difficult for myself to work with.  I guess I'm just too darn dependant on visual cues and layout aesthetics to make it easier to read my code.  I'll take my flexibility-offering noise any day.  Even Pascal-like begin/end keywords don't bother me.  (Not even LambdaMOO's IF...ENDIF, FOR...ENDFOR, etc.  At least they're darn clear. ;))

-- Chris Nicholson-Sauls
December 01, 2006
On Fri, 01 Dec 2006 10:03:21 -0300, Leandro Lucarella wrote:

> Daniel Giddings escribió:

> Bracket (and sentence terminators) are syntactic noise[1].

Much like question marks, commas, periods, parenthesis, whitespace and upper/lower case in English text, no? Some other languages don't use them so why does English persist!?

-- 
Derek Parnell
December 03, 2006
>>Or this:
>>
>> > FunkyThing(some_expression,
>> > {
>> > 	<< More Code >>
>> > });
> 
> You can, or we can adapt backslash (like in bash) to do this:
> FunkyThing(some_expression, \
> { \
> 	<< More Code >> \
> }); \
> 
> I know, it is awful. Another proposition can be:
> Implicit { introduce additional indentation level inside.
> So it will be like:
> FunkyThinkg(some, \
> {
>    xx
>    if y:
>      z
> })
> 

So if curly braces are unneccesary and nothing but syntactic noise... then why are you using them, and then having to invent hacks to get around the fact that you're relying on indentation?

The fact that you're having to compensate for their absense obviously means they aren't redundant :3

> 
>>P.S.  Just so you know, I love Python's syntax.  I just don't think
>>it's suitable for D. :)
> 
> I also like Python's syntax, but i think small portion of D can be
> adapted to this syntax (if anyone like tabs, and if it will be used
> by anyone). I also think that people frustrated by Python syntax,
> simply have bad editor/configuration. Lots of editors now is not tabaware.
> 
> PS. I use in all languages (Python, C, D, etc.) hard-tabs (for
> indentations), which are displayed as 4-character in my
> editor. There are simple rules to be consistent with such style, and not
> introduce problems in any situation.

And there's another problem with Python's syntax: I hate *hard* tabs. Absolutely loathe them; they continuously get displayed as 8 spaces when I damn well want them to be 4 spaces.  And some hideously misguided fools display them as *2* spaces!  Those sick, sad people... (joking)

I worked on a project in my third year of uni with four other people. Things were going swell until files started breaking.  Stuff would just stop compiling from svn suddenly.

It turned out that one of the guys was using a MODERN editor that simply couldn't cope with the rigors of Python: specifically, he liked hard tabs but everyone else was using soft tabs.  The editor started changing bits and pieces of our code from soft to hard, and broke tons of stuff.  It was really bad when it would combine soft and hard tabs in places into something that looked valid on HIS machine, but totally borked on ours.  And since Python has nothing bar indentation to signify nesting, it was a painful job to fix it all up manually.

He complained bitterly that it was a pain to have to continually reconfigured his editor to support our coding style.  And he was damn right, too--some say "get a better editor", but he shouldn't *have* to.  He chose his editor for good reasons, and it's not fair to force people to change because you think their editor sucks.

(Incidentally, I use IDLE for Python coding and GVim for everything else.  I guess I just didn't mind so much.)

In the end, we just kept having to "sanitise" his files every once in a while, especially when someone else had to work on them.

I am, once again, rambling.  :)

In any case, you mention converting a "small portion of D"... I think that if you boiled down D to a simple, indentation-based language... you'd end up with Python anyway :P  If you're really set on compiling it to native, I recommend checking out Pyrex.

	-- Daniel
1 2 3 4 5
Next ›   Last »