studio42gmbh / dl Goto Github PK
View Code? Open in Web Editor NEWData Language
Home Page: https://github.com/studio42gmbh/dl/wiki
License: MIT License
Data Language
Home Page: https://github.com/studio42gmbh/dl/wiki
License: MIT License
Currently the data types are not properly converted into the given generic target type see test:
Use DLType.write, Use Stringhelper
It might be interesting to allow primitive typecasts in expressions.
like:
Integer t : 5 / ((int) 8.4 / 3.2 );
Allow to define alternative types for an attribute within a complex type (sort of like a union)
something like:
type GPImage extends Image {
Material|Shader|Texture material; // <- material can be one of the types Material, Shader or Texture
}
It would be great to allow querying instances/attributes from a DLModule in a flexible and performant way a little like CSS.
Analogous to type and annotation it would be good to allow definition of enums from an integration using:
extern enum <integration>;
Finalize, test and create a release package 1.01
There shall be data types like String which are "simple" types. And there are types having attributes, containing other elements, ... which are called "complex" types
It would be cool if it was possible to combine annotations into a new annotation with boolean operations and parameter presets
something like:
annotation myKeyword(maxLength) (required & length(4, maxLength)) & !upperCase;
by that you could use annotations to build contracts from it.
This might make working with DL in manual files much more convenient. On the other side it makes the whol DL more complex and error prone ...
// new - shorter and results in "native" boolean - also consider stativ vs. dynamic (with $refs) terms
boolean b : ($state & $state2) | (true != !$state3);
boolean b2 : 7 != 6;
boolean b3 : 7 != $val;
int i : 5 * 3 + 2;
int i2 : 5 * $val2 - 2;
// currently possible with DL - own type tree BoolT, Or, And, Bool, Not, Xor, True, False
BoolT b : Or {
And {
Bool { value : $state; }
Bool { value : $state2; }
}
Xor {
True {}
Not { value : $state3; }
}
};
// Or special Eval with subparser ... might also use ANTLR ...
Eval var : Eval { expr : "$0 != $1", data : $a, $b; };
Eval var : Eval { expr : "7 != $ref"; };
The DefaultCore shall provide a DLType for lists. Best would be with generics support to allow filling lists from dl directly.
This new keyword transform would allow to define an internal and external conversion between two types
It could be interesting to add namespaces for scoping types, instances, etc. in modules or across modules)
This is a fundamental extension and might not be in the scope of a Beta release.
something like:
namespace mqrc {
type A
{
String test;
}
}
// ...
use mqrc;
A test { test : "aha"; }
unuse mqrc;
// or:
namespace mqrc {
A test { test : "aha"; }
}
Analogous to disallowing to define types or annotations it should be possible to disallow requiring contents
Allow to define a default attribute within a type that can then be used within assignments.
Needs to extend DLInstance to have a default attribute, add an annotation @default and extend the assignment handling in parser.
something like:
type H1 extends HTMLElement
{
String text @default: "";
}
Div myContent {
H1 heading : "Welcome"; // <- Creates a new instance of H1 and assigns its text
P description : "Little text \nwith multiple lines"; // <- Creates a new instance of P and assigns its text
}
The DefaultCore shall provide a DLType for maps. Best would be with generics support to allow filling lists from dl directly.
Currently the annotation export does not throw an exception when used on attributes in the module. This should not be possible
i.e.:
//... in module
int width @export : 640;
int height @export : 400;
//...
This allows to create own DLType implementations and map them using extern type ...
This in combination with expressions & and | makes using masks easier.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.