Menu

mtasc -strict

Help
dt
2005-03-14
2013-04-17
  • dt

    dt - 2005-03-14

    Hi,

    I read Simon's post on the [mtasc] list saying that as2lib was mostly mtasc compliant. However, I was wondering if that was using -strict? I've downloaded the sources from CVS, and there are many errors using this signature:

    someMethodName(Void)

    Is Void required?

    Thanks.

     
    • Simon Wacker

      Simon Wacker - 2005-03-15

      I also posted about this on the mtasc list:
      We are not planing to support the strict compiling mode of mtasc. We have some internal "code conventions" that are not compliant with the strict mode of of mtasc. One convention is for example that we do not use Object as type, because instances casted to interfaces are not supposed to be of type Object by MMC.
      We use Void as argument to indicate that the method does actually not expect any arguments. If you just use parentheses it is not really clear whether arguments are expected or not because no declared arguments could indicate that zero to infinite arguments are expected.

      Cheers
      Simon

       
    • dt

      dt - 2005-03-17

      Hi Simon,

      Thanks for the replies. I apologize for causing you to reply in two places; I'll continue the conversation here, as it's the proper place.

      The more I think about it, the more it feels like as2lib should compile under mtasc with the -strict flag. I realize that you are providing a library free-of-charge-- so I don't want to sound like I'm dictating to you; but perhaps I could try and convince you?

      1.) -strict ensures better coding conventions. I hear what you're saying about distinctly saying a method expects nothing as a parameter could be viewed as a good thing, but there are other ways of ensuring this. In addition, the requirement of MMC that instances casted to interfaces not be Object-- what are they supposed to be? According to Macromedia's docs: "You can cast an expression to an interface. If the expression is an object that implements the interface or has a base class that implements the interface, the cast succeeds. If not, the cast fails."

      2.) Pragmatism is a good thing. The developer of MTASC was kind enough to change his personal view point and give the community more of what it wants. Not because he wanted it, but because others requested it from him. I would like to see MTASC be one of the de facto compilers for Flash-- and as2lib to be one of the de facto libraries.

      3.) I would like to use as2lib for almost all that it offers. However, I would also like to be able to develop using -strict in my own work-- and to do so as2lib must also be strict. I could just change the sources for as2lib to compile strict (in fact, I originally started doing so), but I don't want to end up out of sync with as2lib's sources.

      I would like to open a dialogue on this. If you don't have the time to convert it, I would be happy to do so and comment/list all changes. I think Nicholas and MTASC have done much for the open source community-- and I feel the same way about as2lib. I'd like to see them both working toward the same goals.

      Thanks,
      -dt

       
    • dt

      dt - 2005-03-24

      Are you busy or ignoring me? :)

       
    • Simon Wacker

      Simon Wacker - 2005-03-26

      1.) Yep, -strict ensures better coding pracitice, I agree with you in this.
      And yeah, Interfaces are of type Object. Basically everything in Flash is of type Object whether the MM compiler says so or not. Object is just the base class. And if your type a parameter as being of type Object every instance regardless of its type and regardless of whether it is casted to an interface must be able to be passed-in without getting a compiler error. And that is sadly not the case.

      2.) Definitely. But the as2lib must (or I want it) to be compilable with MMC and with MTASC. And it is actually, just not with the -strict mode.

      3.) It would be nice if the as2lib could be compiled in -strict mode. I agree with you. But some bugs in MMC must be fixed first so that the as2lib can be compiled with MMC and MTASC -strict.

      "I think Nicholas and MTASC have done much for the open source community": Yeah, definitely.

      Greetings
      Simon

      PS: Sorry for the late response. I do not look that often into this forum. If you post to the nightly mailing list I'll get a mail and can response directly.

       
    • dt

      dt - 2005-03-28

      How is it that I start trying to convince you and instead you convince me?

      Seriously, you're absolutely right-- I think that compiling in both is more important than compiling in mtasc using -strict.

      I appreciate the time and explanation.

       
    • Simon Wacker

      Simon Wacker - 2005-03-30

      I am actually thinking about supplying an as2lib version for mmc and mtasc normal and one for mtasc strict with main releases like 0.1 final.
      You kind of convinced me. ;)

      Cheers
      Simon

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.