From: Kent Friis on
Den Fri, 02 Jun 2006 21:53:25 -0700 skrev Michael J. Mahon:
>
> Many years later, I think that the "offside rule" for delimiting
> blocks simply by indentation is a very nice approach. Why on
> earth should white space, the most significant characteristic of
> text to the human eye, be ignored by most programming languages?

For the same reason that comments, the most human readable text found
in a program, are ignored by the programming language. Whitespace is
an important part of making the program more readable.

A programming language that prevents me to use white space to make
code readable (because that would change what the code does) is just
as bad as one that prevents me from writing a comment where needed
(Actually, Visual Basic .NET does that in certain places. Yuck).

/Kent
--
Hard work may pay off in the long run, but laziness pays off right now.
From: Kent Friis on
Den 31 May 2006 07:41:06 -0700 skrev mdj:
> Paul Schlyter wrote:
>
>
>> I don't consider that an API, but a library! An API should provide access
>> to something else but itself. Such as external hardware, or some other
>> software module.
>
> Fair enough. I consider the terms API and "standard library"
> synonymous, as I'm sure most developers do ....

Just like certain Java-programmers who consider Interface and Class
synonymous... (That's what the I in API means - Interface).

There is the interface and the implementation. The two halves of
a working library.

/Kent
--
Hard work may pay off in the long run, but laziness pays off right now.
From: Paul Schlyter on
In article <4481759c$0$15787$14726298(a)news.sunsite.dk>,
Kent Friis <nospam(a)nospam.invalid> wrote:
>Den 31 May 2006 07:41:06 -0700 skrev mdj:
>> Paul Schlyter wrote:
>>
>>
>>> I don't consider that an API, but a library! An API should provide access
>>> to something else but itself. Such as external hardware, or some other
>>> software module.
>>
>> Fair enough. I consider the terms API and "standard library"
>> synonymous, as I'm sure most developers do ....
>
>Just like certain Java-programmers who consider Interface and Class
>synonymous... (That's what the I in API means - Interface).
>
>There is the interface and the implementation. The two halves of
>a working library.

I fully agree with that! The API is the specification, not the
implementation. There might be some parts of the library which
can be called by outside code but wasn't intended to be called in
that way - they're not part of the API, even though they're part of
the library!




--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/
From: Paul Schlyter on
In article <Pine.LNX.4.64.0606030103360.32465(a)dosius.ath.cx>,
Lyrical Nanoha <lyricalnanoha(a)dosius.ath.cx> wrote:

> On Fri, 2 Jun 2006, Michael J. Mahon wrote:
>
>> Linards Ticmanis wrote:
>>> Michael J. Mahon wrote:
>>>
>>>> Actually, I believe that _pragma_ was borrowed from Algol 68,
>>>> which must be the most influential least implemented language. ;-)
>>>
>>>
>>> As they say, Algol was a great improvement on its successors. ;-)
>>
>> Algol 60 introduced many great ideas, like block structure and
>> BNF syntax description.
>>
>> Algol 68, with its meta-syntactic definition, served to clarify
>> a number of issues in language design, but ultimately confused
>> its non-theorist "market". I really liked the palindromic block
>> delimiters though ("do"-"od", "if"-"fi", etc.), and I used them
>> for a system implementation language ("proc"-"corp", "case"-"esac",
>> "struc"-"curts", etc.).
>
> You have if/fi and case/esac in the Bourne shell too. :) Looks weird
> though.

It didn't look wired rather than weird? :-)


>> Many years later, I think that the "offside rule" for delimiting
>> blocks simply by indentation is a very nice approach. Why on
>> earth should white space, the most significant characteristic of
>> text to the human eye, be ignored by most programming languages?
>
> You'd like Python.
>
> -uso.
--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/
From: Kent Friis on
["Followup-To:" header set to comp.sys.cbm.]
Den Sat, 03 Jun 2006 12:42:56 GMT skrev Paul Schlyter:
> In article <4481749f$0$15787$14726298(a)news.sunsite.dk>,
> Kent Friis <nospam(a)nospam.invalid> wrote:
>
>> Den Fri, 02 Jun 2006 21:53:25 -0700 skrev Michael J. Mahon:
>>
>>> Many years later, I think that the "offside rule" for delimiting
>>> blocks simply by indentation is a very nice approach. Why on
>>> earth should white space, the most significant characteristic of
>>> text to the human eye, be ignored by most programming languages?
>>
>> For the same reason that comments, the most human readable text found
>> in a program, are ignored by the programming language. Whitespace is
>> an important part of making the program more readable.
>>
>> A programming language that prevents me to use white space to make
>> code readable (because that would change what the code does) is just
>> as bad as one that prevents me from writing a comment where needed
>> (Actually, Visual Basic .NET does that in certain places. Yuck).
>
> Check out Python - there indentation delimits if blocks. And I cannot
> se any reason why:
>
> if condition
> statement1
> statement2
> else
> statement3
> statement4
> rest_of_program
>
> is more readable than:
>
> if condition
> statement1
> statement2
> else
> statement3
> statement4
> rest_of_program
>
> :-)

For the same reason that /* aadkfjghaldfjghsdklfgjhasdklguaadfkghj */
is better than being unable to write a comment: Both are stupid examples
of using a thing meant for making things easier for the exact opposite
cause.

Now try to imagine that someone wants to indent code to actually make
it *more readable*, just like someone writing comments to actually
explain what's going on. Then you might see the point.

/Kent
--
Hard work may pay off in the long run, but laziness pays off right now.