[Tfug] Language choices

Bexley Hall bexley401 at yahoo.com
Sat Nov 4 10:00:54 MST 2006


Hi, Stephen,

Stephen Hooper <stephen.hooper at gmail.com> wrote:    Logo! Logo!

  Ouch!  I hadn't even considered that!  :<  I guess I think Logo I think "turtles"
  and not "processing".  I'll have to dig out my course notes to see for sure...
   
  I also deleted your "bullsh*t" email (Yahoo is intolerant of snafu's on my part).
  But, from memory...
   
  APL actually isn't terribly bad when it comes to punctuation.  The problem is
  you need an APL typeball to use it!  :-/  If you replaced the symbols with
  ASCII tokens, it wouldn't be bad at all.  (though crappy for my needs!)
   
  As for my "new languages" use more punctuation...
   
  Summary of operators -- as best as I can remember  :>
(arbitrarily chosing to ignore decimal points in numeric
values *and* all characters within strings; I also ignored
mundane things like how lines are continued -- as well
as any JCL required to *run* particular programs, etc.)
  Note that I just list punctuation in the order in which
I *remember* it.  And, I don't consistently mimic the
order of earlier languages in subsequent presentations.
(e.g., Modula2's alternation operator is listed AS IF it
was a logical operator).
  This isn't meant to be a comprehensive/scientific analysis;
just something to get a quantitative *feel* for the various
assortments of punctuation/operators in languages.  But, it
is amusing to compare the amount of cruft in, e.g. Perl or Java,
vs. "older" languages...
  
ASM (VAX -- including macro capabilities)
  a=b a=. a+b a-b a*b a/b
label:
.directive
@pointer
(address) (address)+ -(address)
@(rn)+
(rn)[rm]
<expression>
$macro
?parameter
a,b
; comment
#constant
/string/ "string"
^Bbinary  etc.
   
  (Dartmouth) BASIC
  -a +a
a+b a-b a*b a/b a^b a,b
a=b a>b a>=b a<b a<=b a<>b
stringtype$
"string"
function()
array(b)
(expression)
PRINT;

  C++
  +a -a ~a !a &a *a
a+b a-b a*b a/b a%b a>>b a<<b a&b a|b a^b
a++ ++a a-- --a
a+=b a-=b a*=b a/=b a%=b a>>=b a<<=b a&=b a|=b a^=b
a=b a==b a!=b a>b a>=b a<b a<=b
a&&b a||b a.b a->b a:b a,b a::b
a?b:c
'a' "a" '\a' \0a (significant leading zero)  \xDEADBEEF
case:  statement;
/* comment */   // comment
function()
function(...)
(expression)
a[b]  "a_string"[b]  (you "read" this differently than a[b])
#define  (well, it's technically the preprocessor, but...)
{ block }
plus all the overloading allowed (which increases instances of symbols)
   
  FORTRAN
  a=b a+b a-b a*b a/b a**b a,b
.relop.  .logop.  (I think later versions allowed >, <, >=, etc.)
function()
(expression)
*comment   (though '*' could have been 'C' to eliminate punctuation)
   
  Java (same as C++, more-or-less, plus:)
  id$ent_ifier (including unicode characters!)
\uUNICODE
a>>>b a>>>=b
   
  Limbo (much like C with a few additions and changes)
  RADIXrVALUE
\uUNICODE
#comment
iden_tifier   (including unicode characters)
'a' '\a' "string"
a:=b a<-b a=>b a:b
string[from:to]
no &a allowed
no a?b:c
different a::b semantics
different comment syntax:  #comment
different function(...) syntax:  function(*)
different "preprocessor" syntax
different switch/case syntax
   
  LISP
  () () () () () () () () () () () () () () () () () () () () () () ()
+ - x / ' ` < >
LET*  #'
   
  Modula-2
  +a -a ~a a^
a+b a-b a*b a/b a&b a|b a:=b a.b a,b
a=b a#b a<>b a>b a>=b a<b a<=b
"a" 'a'
case:  statement;statement
(* comment *)
function()
(expression)
array[b]  array[a..b]
{set}
   
  Pascal
  +a -a a^ ^a
a+b a-b a*b a/b a:=b a.b a,b a:b a..b
a=b a<>b a>b a>=b a<b a<=b
a;
statement;statement
{comment}  (*comment*)
'string
function()
(expression)
array[b]
   
  PL/1
  i_de#nti$fie at r
'string'
-a +a ~a
a+b a-b a*b a/b a**b a||b a&b a|b a,b a->b
a=b a<b a<=b a>b a>=b a~<b a~>b a~=b
statement;
/*comment*/
%preprocessor
function()
array(b)
(expression)
   
  PL/M
  -a +a
a+b a-b a*b a/b a=b a,b a.b
a<b a<=b a>b a>=b a<>b
function()
array(b)
(expression)
iden$tifier
statement;   label:
'literal'
.(location)
$INCLUDE
/*comment*/
   
  REXX
  i_de$nt?ifie!r
'a'  "string"
function()
+a -a ~a
a+b a-b a*b a/b a//b a%b a**b a||b a&b a|b a^b a&&b a.b a,b
a<b a<=b a>b a>=b a~<b a~>b a==b a~=b a~==b a=b
array(b)
(expression)
/*comment*/
label:
   
  SMALLTALK
  RADIXrVALUE
$character
'string'
"comment"
#symbol
[block]
:parameter
+a -a ^returned
a_b a+b a-b a*b a/b a//b a\\b a at b
a<b a<=b a>b a>=b a~=b a==b a=b a~~b
message:
|temporary|
(expression)
   
  SNOBOL ("4", I think)
  iden.ti_fier
'string'   "string"
+a -a $a ~a ?a @a .a
a+b a-b a*b a/b a!b a**b a|b a.b a$b a=b a,b
(expression)
:F(label)   :S(label)   :(label)
function()
&keyword
ARRAY(b)   array<b>
*comment
   
  PERL
  $scalar  &subroutine  @array  *glob  %hash
"string"  `command`  /pattern/  ?PATTERN?  (list)  {block}  <STDIN>  <>
+a -a !a a++ ++a a-- --a \a <<a $#a a?b:c
-e -r -w -d -f -T (file test operators)
a+b a-b a*b a/b a%b a>>b a<<b a&b a|b a^b a**b axb a,b a.b
a+=b a-=b a*=b a/=b a%=b a>>=b a<<=b a&=b a|=b a^=b a**=b a.=b ax=b
a=b a==b a!=b a>b a>=b a<b a<=b a<=>b a=>b
a&&b a||b a&&=b a||=b a=~b a!~b a->b a->[b] a{b} a..b a::b
$& $` $' $+ $* $| $% $= $- $~ $^ $_ $. $/ $, $\ $" $; $: $? $! $@ $$ $< $> etc.
statement;   label:
array[b]  function()
plus a littany of regex pattern characters, backreferences, assertions,
magic variables/constants, etc.  (?= ?! ...) ("KitchenSink")

   
  <shrug>  When you look at BASIC, FORTRAN, PL/1, etc. they really *do*
  look a lot "cleaner" in this regard, eh?
   
  --don


 
---------------------------------
Low, Low, Low Rates! Check out Yahoo! Messenger's cheap  PC-to-Phone call rates.


More information about the tfug mailing list