Tuesday, April 16, 2019

Zepton is 21st Century Pascal??

I had someone tell me when I explained Zepton...actually ZeptoN, to them tell me in so many words that Zepton is like Pascal...the popular language from the 1970’s created by Niklaus Wirth.

My own process of learning to program was BASIC (of course...all kinds from Sinclair BASIC in 1978 to GW-BASIC in 1985 to QBASIC and QuickBASIC in 1990), FORTRAN77, Pascal and C, C++, and Java. Along the way other programming languages I’ve learned...Forth, Prolog, LISP, Scheme, etc. But Pascal was a favorite. Back in the 1990’s I was a computer science major, and then later the department moved to C++, but code was the Borland Turbo Pascal, and of course Sun Pascal (64-bit). One language I liked but Veridian Ada95, I was a big Ada fan...it was verbose, but very portable. Later I was a fan of C#...but I preferred the Mono mcs C# compiler.

But Java has filled that role of Pascal, but Java is a cool programming language (everyone seems to hate it...), but it is vast in features and concepts to learn. So hence Zepton.

Unlike Pascal, Zepton is compatible with Java syntax, and uses Java class/libraries/packages. So very much a learning language.

Yet I think this someone was trying to imply ZeptoN was a “toy language” good for learning, but not much else. Even if this were true, Zepton allows a newbie to learn Java without having to learn features for classes, interfaces, etc. So that knowledge is scalable and applicable to Java.

But I think learning language, or a “toy language” and a programming language for development is a false alternative, a false choice. I remember a favorite computer games, “Secret of the Silver Blades” and “Pool of Radiance” were written in Turbo Pascal. So much for a “toy language” but Turbo Pascal added features not standard to Pascal to give it more power, usefulness, utility. Java has such features in the libraries/packages/frameworks, Zepton allows a developer to use them without creating a class.

Consider the ubiquitous program in both Java and Zepton--Java first:

public final class helloWorld extends Object {

  private helloWorld(){}

  private final static String GREETING = “Hello, World!!!”;

  public final static void main(final String[] args){
    System.out.println(helloWorld.GREETING);
    System.exit(0);
  }
}

similarly in ZeptoN:

prog helloWorld {
  final static String GREETING = “Hello, World!!!”;
do
  println(helloWorld.GREETING);
  exit(0);
}

Quite simply, the ZeptoN program is more concise, and implements a similar application.

One possibility is to use an existing but unused keyword from Java, or even another to shorten “final static” to say “const”...but that would create a ZeptoN feature that is not conceptually and syntactically compatible with Java. That would contradict the core idea that ZeptoN is Java compatible in syntax, keywords for features used. Also I don’t measure the versatility of a programming language with using fewer keywords, operators, or other lexemes.

APL is great example of a programming language that is concise, easy to write--but a write-only programming language. Another possibility is to allow more concise syntax, and as part of the transcompilation process, emit “pure” ZeptoN source code as part of the transcompilation process. Still, a newbie or developer would then have to unlearn the concise syntax not available in Java and make the distinction in ZeptoN. So not a useful approach or option.

So ZeptoN might be considered a “21st century Pascal” but its more like the more powerful Pascal dialects but without an proprietary, idiosyncratic features required with the original Pascal. Also ZeptoN is not a new, untested, untried programming language, its is Java with a program entity sans more advanced object-oriented features.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.