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 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, Python. All influenced SS.
Then one which I have used extensively - PHP. I use the latest version, with OOP features, extensively.
So these all contributed to my own thinking, thus my many "play" languages along all those years (one, in 2003, was "CodeBol" where BOL meant "Bagwell's Own Language") began to solidify.
The result is work toward definition, sporadically since 2009 - SS - "Scripting System". Extensisive reworking and tuning began in the second half of 2018.
Goals in the design of SS
- Object oriented, with single inheritance and multiple interface implementation.
- Every value looks like an object. Strings, variables, constants and arrays all look like objects.
- Parameterized procedures in interfaces and objects. They apply to multiple types.
- Reduced punctuation and less words. No semicolons.
- Support read-only and write-only "properties".
- Definition of expression operators and type casts and indexing.
- No typeless or "mixed" type variables or arrays.
- Type safety. It is possible to keep inches separate from centimeters.
- Support Perl compatible regular expressions.
- Enhance readability and ease of editing.
- Avoid problems in the use of an ENUM feature in C. ENUMs are simply defined names for integers, not typed, in C-like languages.
- Avoid the mistakes caused by assuming a value is a boolean (true/false).
- String output formatting better controlled and not like Fortran.
- Capable of compilation to machine code.
- Check more at compile time.
- No support for events and threads. These can be added as procedures.
- Names can use a set of additional European characters and accented letters as letters.
- Support for Unicode characters.
- An array can have string indexes rather than integer indexes. 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. Explicit memory allocation and deallocation is not provided.
- Some operators are different. Equality is "=?" rather than "==". This helps avoid some errors.
- Operators and type casts and array indexing can be defined on objects.
- The mode feature 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 function or mode or method invocation with no arguments does not use a pair of parentheses.
- 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 and usage is cleaner than PHP 'trait'.
- SS has a parameterized interface and procedure type capability. One object definition 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.
- Regular expression patterns have an optimization capability.
- Complex type is supported through a definition file.
E-mail me at: john (at) IdahoBagwells (dot) NET.