SS Programming Language
What I'm Doing Now
- Adjusting the SS language to fit requirements and clarify the design.
- Working on a syntax rules definition and a preliminary syntax scanner.
Why am I creating a new programming language?
OK - I've been retired now for a few years, and I am no longer working in compiler language development - why design a new language?
I have been keeping up with ideas in programming languages ever since I began in this field back in the early 1960s.
I learned and worked with a succession of languages, each trying to "fix" some issue in programming.
Languages have come and gone in popularity because new ideas happened.
The first was Fortran, which I was involved in as a compiler developer, published a paper on local optimization ("Local Optimizations"), managed a compiler development group,
and I participated in the ANSI standardization of Fortran 77.
Along the way I learned and used, or taught classes about, or at least played with, these languages: Algol 60, PL/I from IBM, Ada (designed for government contracting),
Pascal (designed for education), then I learned C.
C was different - it was compact, simple, and very efficient. As a compiler developer,
I felt that C was the first language that I thought could be used for system programming. I used C professionally for over 20 years.
Along came objects and classes. The language C++ turned the programming world upside down and added new goals and ideas. The
ideas of data encapsulation and inheritance were encouraged. Design patterns developed.
From there the language horizons expanded. Along came Sun's Java. Then Microsoft's C# for their .NET system.
And one which I have used extensively - PHP.
So these all contributed to my own thinking, thus my many "play" languages along all those years (one in 2003 was "CodeBol" wher BOL meant "Bagwell's Own Language") began to solidify, beginning September 16, 2009.
The result is work since 2009 - SS - "Scripting System".
Goals in the design of SS
- Object oriented, with single inheritance and multiple interface implementation.
- EVERYTHING looks like an object. Limited reflection is supported.
- Strings, variables, and array names all look like objects.
- Parameterized interfaces and objects. They apply to multiple types.
- Reduced punctuation and less words. Less parentheses. Avoid most two-word keywords, such as unsigned int.
- Similar capability with Java and C#, yet simpler.
- Support read-only and write-only "property" variables.
- Definition of arithmetic operators and type casts and indexing.
- Support Perl compatible regular expressions.
- Reduce programming errors. No semicolons, less parentheses.
- Variables are typed, not typeless or mixed type.
- Type safety. It is possible to keep inches separate from centimeters.
- Reduce paren and bracket balance problems.
- Avoid problems in the use of an ENUM feature in C. ENUMs are simply defined integers, not typed, in C and C++.
- Avoide the mistakes caused by assuming a value is a boolean (true/false).
- String output formatting better controlled and not like Fortran.
- Change inconsistent syntax - the C language, example:for statement is strange. It uses semicolons inside parentheses.
- No support for events and threads. Can be added as procedures.
- Capable of compilation to machine code.
- Check more at compile time.
- Names can use a set of additional European characters and accented letters as letters.
- Suppport for Unicode characters.
- An array can have string indexes rather than integer indexes. Both fixed length and variable length arrays are supported. Arrays of arrays are possible. No two-dimensional arrays are allowed. Unlike PHP, arrays and their indexes are typed.
- A number of array procedures and statements are provided. Array expressions and assignments.
- A list or tree or hash table can be made to operate like an array.
- Pointers are not used. Esplicit memory allocation and deallocation is not provided.
- There is less use of parentheses. Some operators are different. Equality is "=?" rather than "==". This helps avoid some errors.
- The mode feature is different. It encourages an unusual style which avoids errors. A mode is like a function based on a defined object type that implicitly returns a reference to its base object or a new object. It normally just sets an indicator or is part of the settings of an object.
- A generator function enables abstraction when obtaining a sequence of values, also simpler scan of arrays or strings.
- Variant procedures provide an alternative to abstract procedures in an object type. The syntax is cleaner than PHP 'trait'.
- SS has a parameterized interface and object type. Objects and functions can support multiple types.
- An enhanced object type can keep units apart, like Fahrenheit versus Celsius, or Centimeters versus Inches.
- The model for file manipulation is different. Files are typed to keep text separate from data blocks.
- Formatting for output is designed to be less error-prone, and is not patterned after Fortran. Formatting is not in a string.
- Regular expression functions have an optimization feature.
- Values (variables, array elements) can be embedded in a string value.
- Operators can be defined on objects.
- Complex type is supported through a definition file.
E-mail me at: john (at) IdahoBagwells (dot) NET.