Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Optional attributes would be passed with var-arg parameters at the end. 

Code Block

    // simple type Fallcase
    lalala = readOptionalField("lalala",  dataReaderUnsignedInt( ....), something == true)

    // Enum Fall type case // TODO: magic trick is to use the function pointer of the enum parse static method
    lalala = readOptionalField("lalala", enumReader(TypeOfHurz.class::enumForValue, dataReaderUnsignedIntdataReaderUnsignedIntCreatorDingels( ... readBuffer ....)),  something == true)

  , withAdditonasdl(), withEncoding(), withFickiciy())

    // Complex Fall type case // TODO: magic trick is to use a supplier lambda for the staticParse
    lalala = readOptionalField("lalala", complexTypeReader((TypeOfHurz.class)->TypeOfHurz.staticParseIwas(readBuffer, asdasdasdasd, asdasd), readBuffer),  something == true)

    

Cleaning up the way params are passed to types

In General we decided to replace the square bracets around the passing of parameters from one type to the other with round bracets. This makes the syntax a bit more similar to normal programming languages.

We also moved the place where params are passed from the end to directly after the complex type name.