www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript
electronics



digitalmars.D - Re: why ; ?

↑ ↓ ← terranium <spam here.lot> writes:
Nick Sabalausky Wrote:

 Python's semantically-meaningful indentation was intended to fix the problem 
 of poorly-indented code by enforcing proper indentation in the language and 
 compiler. But the problem is, it *doesn't* actually enforce it.

:-/ It's a hard task to keep code poorly formatted in MS Visual Studio, since a code formatter is built into editor.
May 07 2008
↑ ↓ "Nick Sabalausky" <a a.a> writes:
"terranium" <spam here.lot> wrote in message 
news:fvsdet$231s$1 digitalmars.com...
 Nick Sabalausky Wrote:

 Python's semantically-meaningful indentation was intended to fix the 
 problem
 of poorly-indented code by enforcing proper indentation in the language 
 and
 compiler. But the problem is, it *doesn't* actually enforce it.

:-/ It's a hard task to keep code poorly formatted in MS Visual Studio, since a code formatter is built into editor.

Exactly. That's the second reason I disagree with Python's rationale for their indentation mechanism: Automatic code formatters already solve the issue without introducing hidden bugs. And, they're relatively easy to implement anyway, or at least compared to a full-blown compiler (especially if you write it in D ;-) ).
May 07 2008
↑ ↓ Robert Fraser <fraserofthenight gmail.com> writes:
Nick Sabalausky wrote:
 "terranium" <spam here.lot> wrote in message 
 news:fvsdet$231s$1 digitalmars.com...
 Nick Sabalausky Wrote:

 Python's semantically-meaningful indentation was intended to fix the 
 problem
 of poorly-indented code by enforcing proper indentation in the language 
 and
 compiler. But the problem is, it *doesn't* actually enforce it.

since a code formatter is built into editor.

Exactly. That's the second reason I disagree with Python's rationale for their indentation mechanism: Automatic code formatters already solve the issue without introducing hidden bugs. And, they're relatively easy to implement anyway, or at least compared to a full-blown compiler (especially if you write it in D ;-) ).

There is a D code formatter... it's written in Java, though. It has ~300 options last time I touched it, but I think it'll get a couple more when I get around to updating it for D2.
May 07 2008
↑ ↓ → Ary Borenszweig <ary esperanto.org.ar> writes:
Robert Fraser escribió:
 Nick Sabalausky wrote:
 "terranium" <spam here.lot> wrote in message 
 news:fvsdet$231s$1 digitalmars.com...
 Nick Sabalausky Wrote:

 Python's semantically-meaningful indentation was intended to fix the 
 problem
 of poorly-indented code by enforcing proper indentation in the 
 language and
 compiler. But the problem is, it *doesn't* actually enforce it.

Studio, since a code formatter is built into editor.

Exactly. That's the second reason I disagree with Python's rationale for their indentation mechanism: Automatic code formatters already solve the issue without introducing hidden bugs. And, they're relatively easy to implement anyway, or at least compared to a full-blown compiler (especially if you write it in D ;-) ).

There is a D code formatter... it's written in Java, though. It has ~300 options last time I touched it, but I think it'll get a couple more when I get around to updating it for D2.

My intentions are to update to 1.029, then support latest 2.x, then optimize while retaining correct semantic funcionality. :-)
May 07 2008