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.

Full Threads Oldest First

Showing messages 1 through 5 of 5.

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

    Sadly Delphi/Kylix (Object Pascal) is often overlooked. Perl, Ruby, etc. are all find for scripts, but in most cases, a compiiled program in a better way to do. Delphi lets you program procedurally like C, or with Objects like C++, only the union is much more natural. It prevents you from making many stupid mistakes, while allowing you 99.9% of the power C has. It borrows some syntax from perhaps better languages (Oberon, Modula, etc.), but has a much bigger and more useful standard library. (Unofficially, anyway...)
  • Ideal language: Delphi w/ Clarion influence
    2003-05-14 13:57:11  anonymous2 [View]

    You should look at REXX.

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

      Hi,

      I've looked at REXX, and it seemed nice (I used it on Amiga and OS/2). Last I checked though, it didn't compile, and also it doesn't have nearly the standard libraries that Delphi or Java has. (At least it doesn't have the mess that C has).

      One thing that's often over-looked is that diversity is great, but when people write something in a non-compiled language like PERL, the users need to have the runtime interpreter, and often, libraries installed. I find it impossible to have my linux machine without having stuff like NROFF, PERL, PYTHON, RUBY, etc., that I will never use directly. I think it's great to have diversity in languages, but I don't think we need scripting-language-of-the-week club either. Most things probably should be compiled.
  • stupid thing deleted my indentation
    2003-05-14 12:58:41  anonymous2 [View]

    Ok, my code in that last post did originally have indentation on the code, the posting mechanism deleted it for some dumbass reason.
    • stupid thing deleted my indentation
      2003-05-15 03:22:40  anonymous2 [View]

      HTML ignores leading whitespace unless its in
      s (Your lines of source code are made using 
      s at the end of the lines.)