Skip to content

inventions

pannous edited this page Oct 10, 2020 · 39 revisions

Adoptions

Not new inventions, but cherry-picking the most beautiful, powerful and sane features of other modern programming languages, especially Julia, Swift, Crystal and Kotlin but definitely not Java. Those adoptions include it keyword in closures, multiple dispatch, optional typing, self hosting (secondary goal to not bias language design)

It keyword

The it keyword in closures was a great invention ( first seen in Kotlin?) we extend this to much wider user cases, in fact it becomes the catch all keyword for the current object, variable or result; where Julia has ans etc.

square of number = it*it

Often it is identical to this/self unless there is another object in scope, in which this/self are to be used. What might seem slightly complicated comes very naturally when applied.

To keyword

'to' keyword to define verb functions

To square a number: return it times it

Of keyword

Inverse dot: a.b is b of a Also works in assignments and definitions:
square of number = it*it

In fact this is the preferred way to define property methods out of scope. In scope it would look like this:

Smart scopes

Number {
 Square = it*it
}

Code completion on dispatch methods

To square a number: return it times it

3.squ<tab>
3.square is 9

Code completion on dispatch arguments

To square a number: return it times it

x is number 3
square of <tab>
square of x is 9

Match by type name:

Merge the concept of type and variable (name) in simple functions:

To assign a photo to a contact:
contact.image = photo

keywords

Reserve all pronouns propositions and particles as Keywords Once a word is defined as class it becomes a semi keyword in that properties/methods get assigned to the class:

Integers are numbers
Number a = 3
square of number = it*it

Indexing with '#'

Colors = red, green, blue
Color#1 is red

Home

Philosophy •

data & code blocks

features

inventions

evaluation

keywords

iteration

tasks

examples

todo : bad ideas and open questions

⚠️ specification and progress are out of sync

Clone this wiki locally