ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  What I Hate About Your Programming Language
Subject:   Ideal language: Delphi w/ Clarion influence
Date:   2003-05-14 12:56:38
From:   anonymous2
I'd love to see a delphi language/environment with Clarion's syntax for blocks, ifs, loops, and lack of the semi-colon terminator in favor of new-line. Clarion's syntax is the cleanest I've seen for these basic elements.


Check out this Clarion code:


if x = y
! number of statements doesn't matter
SomeProc('sdf', a)
loop i = 1 to 5
p = x * i
Message('p is ' & p)
end
elsif x > 3
! all loops start with 'loop'
loop while x = 3 and SomeFunc(x)
a = b * c + sin(b+c)
Message('a is ' & a)
end
elsif y = 4 and blah
! anumericvar is converted to string
Message(anumericvar)
else
halt('aarrgh!', -1)
end


No semi-colons and you don't need begin..end in some cases and not in others. Clarion dynamically converts between strings and numbers, and, as a 'general purpose' business language, returns 0 when dividing by zero instead of throwing an error. It supports file structure and window structure declarations (in the language itself) and is a natively event-driven language, with window event loops as just another type of loop in the language syntax. Unfortunately, all these neat features are much less flexible in the long term than the library based ways of Delphi.


1 to 3 of 3
  1. Ideal language: Delphi w/ Clarion influence
    2003-05-16 12:27:29  anonymous2 [View]

  2. Ideal language: Delphi w/ Clarion influence
    2003-05-14 13:57:11  anonymous2 [View]

    • Ideal language: Delphi w/ Clarion influence
      2003-05-16 12:40:02  anonymous2 [View]

  3. stupid thing deleted my indentation
    2003-05-14 12:58:41  anonymous2 [View]

    • stupid thing deleted my indentation
      2003-05-15 03:22:40  anonymous2 [View]

1 to 3 of 3