diff --git a/Programming-language-specification-(Gemstone).md b/Programming-language-specification-(Gemstone).md index b077619..900d291 100644 --- a/Programming-language-specification-(Gemstone).md +++ b/Programming-language-specification-(Gemstone).md @@ -131,11 +131,6 @@ Variables, expressions and constants used as index must resolve to an **integral The standard library and subsequent platform has to provide a function inside the `mem` module with the following declaration: -:::danger -TODO: decide on implementation with either one: - - generic (implication: implement generic system) - - reference cast (implication: undefinied behavior on cast, runtime errors) -::: ```glsl alloc(out ref T, in int: len) @@ -498,15 +493,15 @@ silent type box: foo { ## Comments -comments or ignored characters starts with `#` and ends with a line break +comments or ignored characters starts with `#` and ends with a line break. ```scala #comment +#########comment int: foo #comment -#########comment ``` @@ -536,6 +531,10 @@ returns the current name of the function it is called in returns the current line number the function is called in `lineno(out unsigned long int)` +### Check for language extension +returns one if the specified extension (UTF-8 encoded string) is supported by the current compiler and zero otherwise +`extsupport(in ref short short int, out unsigned short short int)` + # Language Extensions A extension adds extra functionality to the base language. @@ -633,7 +632,7 @@ scheme Serialize = Stringify { The number of type that can be inferred for a generic can be limited with schemes. A generic that is marked with a specific scheme will only accept type that implement that scheme. -``` +```scala scheme Add { type gen: T @@ -654,7 +653,7 @@ fun do_math(type gen: T = Algebra)(in T, in T) schemes can be silent for modules. Every function within it is silent when implemented. If a silent scheme is inheritated then the new scheme is implicid silent. -``` +```scala silent scheme Add { type gen: T