discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Assign Depreciated Then?

NH
nop head
Fri, Nov 11, 2016 12:14 AM

And is it any more disruptive to people than deprecating assign was.

On 11 November 2016 at 00:13, nop head nop.head@gmail.com wrote:

My guess would be using braces to collapse assignments in an editor must
be a pretty obscure use case. Is there more than one person that does this?

On 10 November 2016 at 23:42, doug moen doug@moens.org wrote:

I don't think that forcing people to replace assign() with for() is
acceptable. Because you are encouraging people to exploit a bug in for()
[which I think should be fixed] in order to work around the fact that
assign() prints a deprecation warning.

The easiest way out is to undeprecate assign(), as Nop Head suggested.

If you want people to use {} in preference to assign(), then fix it so
that it works correctly. This means fixing the "unscoped braces" bug, even
though there is a person or maybe some people who have started exploiting
the bug in their own code. And yeah, fixing language bugs usually raises
backward compatibility issues in OpenSCAD. Maybe a broader discussion needs
to occur around this issue of fixing bugs and backwards compatibility.

On 10 November 2016 at 17:52, Marius Kintel marius@kintel.net wrote:

On Nov 10, 2016, at 17:15, nop head nop.head@gmail.com wrote:

Well in my mind deprecating assign was a mistake unless all braces

create a new scope but some people objected to that as they used braces to
fold things in their editor.

That’s a bit hard to enforce without breaking old designs.
Perhaps we should deprecate that behavior as well (unscoped braces).
Just not sure how to best deal with backwards compatibility.

-Marius


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

And is it any more disruptive to people than deprecating assign was. On 11 November 2016 at 00:13, nop head <nop.head@gmail.com> wrote: > My guess would be using braces to collapse assignments in an editor must > be a pretty obscure use case. Is there more than one person that does this? > > On 10 November 2016 at 23:42, doug moen <doug@moens.org> wrote: > >> I don't think that forcing people to replace assign() with for() is >> acceptable. Because you are encouraging people to exploit a bug in for() >> [which I think should be fixed] in order to work around the fact that >> assign() prints a deprecation warning. >> >> The easiest way out is to undeprecate assign(), as Nop Head suggested. >> >> If you want people to use {} in preference to assign(), then fix it so >> that it works correctly. This means fixing the "unscoped braces" bug, even >> though there is a person or maybe some people who have started exploiting >> the bug in their own code. And yeah, fixing language bugs usually raises >> backward compatibility issues in OpenSCAD. Maybe a broader discussion needs >> to occur around this issue of fixing bugs and backwards compatibility. >> >> On 10 November 2016 at 17:52, Marius Kintel <marius@kintel.net> wrote: >> >>> > On Nov 10, 2016, at 17:15, nop head <nop.head@gmail.com> wrote: >>> > >>> > Well in my mind deprecating assign was a mistake unless all braces >>> create a new scope but some people objected to that as they used braces to >>> fold things in their editor. >>> > >>> That’s a bit hard to enforce without breaking old designs. >>> Perhaps we should deprecate that behavior as well (unscoped braces). >>> Just not sure how to best deal with backwards compatibility. >>> >>> -Marius >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> Discuss@lists.openscad.org >>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >>> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> >
M
MichaelAtOz
Fri, Nov 11, 2016 12:31 AM

Some method to manage variables is needed, I have a hundred odd lines of
grouped variables.
I collapse modules and related variable groups so only those I'm working on
take up editor scroll space.
Any better suggestions than {} ? (in one source file - until OpenSCAD gets
editor tabs)


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Assign-Depreciated-Then-tp19018p19030.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Some method to manage variables is needed, I have a hundred odd lines of grouped variables. I collapse modules and related variable groups so only those I'm working on take up editor scroll space. Any better suggestions than {} ? (in one source file - until OpenSCAD gets editor tabs) ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Assign-Depreciated-Then-tp19018p19030.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Fri, Nov 11, 2016 12:36 AM

I think you should be able to program an editor to fold special comments
and use those instead of braces. Perhaps //{ and //}.

On 11 November 2016 at 00:31, MichaelAtOz oz.at.michael@gmail.com wrote:

Some method to manage variables is needed, I have a hundred odd lines of
grouped variables.
I collapse modules and related variable groups so only those I'm working on
take up editor scroll space.
Any better suggestions than {} ? (in one source file - until OpenSCAD gets
editor tabs)


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/
Assign-Depreciated-Then-tp19018p19030.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I think you should be able to program an editor to fold special comments and use those instead of braces. Perhaps //{ and //}. On 11 November 2016 at 00:31, MichaelAtOz <oz.at.michael@gmail.com> wrote: > Some method to manage variables is needed, I have a hundred odd lines of > grouped variables. > I collapse modules and related variable groups so only those I'm working on > take up editor scroll space. > Any better suggestions than {} ? (in one source file - until OpenSCAD gets > editor tabs) > > > > ----- > Admin - PM me if you need anything, or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. Obviously > inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > View this message in context: http://forum.openscad.org/ > Assign-Depreciated-Then-tp19018p19030.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
runsun
Fri, Nov 11, 2016 12:50 AM

nice design with the "filled ? p1 : cursor" part that allows for inner or
outer filled shape.


$  Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 );   $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf )

View this message in context: http://forum.openscad.org/Assign-Depreciated-Then-tp19018p19032.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

nice design with the "filled ? p1 : cursor" part that allows for inner or outer filled shape. ----- $ Runsun Pan, PhD $ libs: doctest , faces ( git ), offline doc ( git ), runscad.py ( 2 , git ), synwrite ( 2 ); &nbsp; $ tips: hash ( 2 ), matrix ( 2 , 3 ), sweep ( 2 , 3 ), var ( 2 ), lerp , animation ( gif , prodVid , animlib ), precision ( 2 ), xl-control , type , rounded polygon , chfont , tailRecur ( 2, 3 ), isosphere ( 2 ), area , vol/center , RGB , CurvedImg , tests ( 2 ), text ; $ Apps: rollApp , blockscad , openjscad , on AWS ( pdf ) -- View this message in context: http://forum.openscad.org/Assign-Depreciated-Then-tp19018p19032.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Fri, Nov 11, 2016 1:13 AM

On Nov 10, 2016, at 18:42, doug moen doug@moens.org wrote:
Maybe a broader discussion needs to occur around this issue of fixing bugs and backwards compatibility.

Agreed.
It’s possible to gauge the popularity of such bug exploits by e.g. scanning all Thingiverse designs.
Not sure if Thingiverse really covers that much of OpenSCAD usage these days though, but it could be a start.

-Marius

> On Nov 10, 2016, at 18:42, doug moen <doug@moens.org> wrote: > Maybe a broader discussion needs to occur around this issue of fixing bugs and backwards compatibility. > Agreed. It’s possible to gauge the popularity of such bug exploits by e.g. scanning all Thingiverse designs. Not sure if Thingiverse really covers that much of OpenSCAD usage these days though, but it could be a start. -Marius