Top Graphic
Ikayzo.org LogoHomeMissionCriteriaPeopleNews
EnglishJapanese

What's New
SDL
08.11.05 SDL is voted in by the review board.

Ikayzo.org Launch
06.24.05 Ikayzo.org, a global professional open source community is launched!

Beanshell
06.10.05 Beanshell joins BeanShell on the Ikayzo.org project list.
OSS Sites
Other great open source sites
  SourceForge
  CodeHaus
Discussion: Design Questions

Design Questions

Daniel Leuck
Wed Aug 17 12:11:49 HST 2005


Hi Folks,

 

Now that we have a suitable number of language geeks on the list, I want to
pose a few design questions for discussion.  The spec for SDL 1.0 is pretty
much finalized.  The only addition I might make is tightening up the
timezones portion of date-time a bit.

 

For SDL 2.0, there are a number of new things to figure out.  They include
possibly adding a few new literal types (I want to keep the number small)
and the big addition: SDLS (SDL Schema.)

 

-------

Starting with the literal types, the literal types that have been suggested
include:

 

byte - example 123b

    question: If byte is included should we support unsigned and signed
bytes  (123b or 123ub).  Unsigned bytes would be represented as Short in
Java and ubyte in C#.

url - example http://server.com <http://server.com/> 

    question: Should relative URLs be supported and if so, how would they
look?

ref - An reference type (suggested by Seth Ladd from this list) - Seth how
should this look?

constraint - A constraint type including regex for Strings, ranges for
scalars, !=, and choice lists for any type.  Examples:

    (!=null)

    (!=null, !="foo")

    (~=".*\.java") # regex test

    ('a' | 'b' | 'c') # choice list of chars

    (>0, <=100) range for integers

 

The criteria for adding literal types is:

    A) Can they be naturally represented by a literal that looks similar to
what is used in common programming languages.

    B) Will they be broadly applicable to many people, domains, etc.

 

-------

For SDLS

 

This is the big item.  The questions are:

 

1. Should SDLS use SDL?  I only want to do this if it is simple and natural,
not for any puritanical reason.

2. What constraints should we support?  I am thinking:

    - A value list with types and optionally a typed vararg list at the end

    - Mandatory attributes

    - Optional attributes

    - bounds on scalars

    - regexs for strings

    - value lists (choices) for any type

 

Example:

things required {

    values double (>=2,<5) int (>0) string (~="java.*", !=null) char...
(!=null)

    attribute required "name" string (!=null)

    attribute required "size" int (>0, <=100)

    attribute optional "weight" int (>=0)

    attribute optional "favorite_char" char ('a' | 'b' | 'c')

}

 

Defines a required tag "things", which has a value list with a double, int,
string, and an optional list of "n" characters all with constraints.
"things" has two required attributes and two optional attributes all with
types and constraints (showing examples of ranges, !=, and a choice list.)

 

3. Should SDLS be inlined at the top of SDL files, placed in a separate
file, or should we support both?

 

Comments, questions, opinions, and creative insults are welcome.

 

Cheers,

Dan

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ml.ikayzo.org/pipermail/sdl-developers/attachments/20050817/5872f3ab/attachment.htm>


Query: [How to search]

Display: Description: Sort: