Pull request

Issue #228 new
Alex Bespalov created an issue

By repo restrictions, cant propose pull request.

Anyway, you can take it from from my fork repo

https://bitbucket.org/Vizit0r/dwscript-for-merge-with-main-repo/src/master/

Full commits descriptions.

Tested on Delphi 11 Alexandria.

Thats was 1st part - bug fixes & multiplatform support

2nd will be proposal of some new things, you will decide yourself, to take it into main repo or not.

3rd - files organizing - demos, tools, etc.

P.S. Thanks for maintain this great project!

Comments (13)

  1. Alex Bespalov reporter

    P.P.S. I use only script part of DWS (+ JSON parser), so have no idea about multiplatform support in Web part, codegens etc - never touch this.

  2. Alex Bespalov reporter

    i will write about some strange things in code here as well.

    a) dwsDynamicArrays.pas, line 551 - // CreateNewDynamicArray (func)

    why “(func)” written there?

    b) dwsCoreExprs.pas- IDataContext(p).AsVariant[0] := buf;; - double ;

    c) // Add a a single value to a dynamic array held in a variable

    double “a a”

    d) IDataContext(p).AsVariant[0] := buf;; - also ends with ;;

  3. Alex Bespalov reporter

    also strange thing.

    I have unit for import my script methods & classes. And this unit not available in script units!

    I add it manually in constructor TSourceUnit.Create, but thats incorrect. Not so easy to understand, where it should be written, i spent a lot of time to investigate this.

    As my opinion - need some reorganization regarding this moment.

  4. Alex Bespalov reporter

    1) dwsOverviewDlg - why is it in SourceUtils folder? As i undestand, it should be somewhere in Demos (as separated app).

    Keep FORM in non-gui framework - not so good idea, as for me.

    2) dwsSynEditUtils.pas - i think, should be moved to “SynEdit folder”, its more relative to SynEdit, than to SourceUtils.

  5. Alex Bespalov reporter

    Didn't finish with commits, 3 left. But also on vacation until end of next week, and last days was busy.

  6. Eric Grange repo owner

    Had a look at https://bitbucket.org/Vizit0r/dwscript-for-merge-with-main-repo/commits/2bd341799254fec3d556bb58ed501cd42d5e1b74

    Added the “Contains” pseudo-method alternative to “in” operator.
    I have questions about the “length” stuff 😉

    GetArrayLength is just a verbose alias for Length for users coming from Java ? But otherwise nothing special ?

    For SetLength/SetArrayLength, in DWScript arrays are full blown reference types, so resizing is a mutation, while in classic Delphi it is a potential clone & copy. So compatibility with other Pascal dialects may be limited, as in DWS it’s a method and not a procedure. Though if it’s for discoverability for with Java users (or other languages where arrays/lists are reference type), this would just be an alias.

  7. Alex Bespalov reporter

    GetArrayLength is just a verbose alias for Length for users coming from Java ? But otherwise nothing special ?

    yes.

    Same for SetLength/SetArrayLength - just aliases for back compatibility.

  8. Alex Bespalov reporter

    @Eric Grange

    2 more commits done.

    Maybe today (but i think tomorrow) will be 2 final, next will make commits with fixed demos etc.

  9. Alex Bespalov reporter

    @Eric Grange a little bit side question: as i see, SynEdit repo updated no longer, but you are 1 of the contributors there.

    I have 1 bugfix (regarding chinese symbols) in SynEdit, is any sense to open isuue there?

  10. Log in to comment