KingBoo
|
  |
| Joined: 16 Jul 2007 |
| Total Posts: 8495 |
|
|
| 23 Apr 2012 09:44 PM |
| Will this affect anything currently made, or...? |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 23 Apr 2012 09:45 PM |
| We have no idea. They said they would. |
|
|
| Report Abuse |
|
|
| |
|
Bubby4j
|
  |
| Joined: 25 Dec 2008 |
| Total Posts: 1831 |
|
|
| 23 Apr 2012 10:02 PM |
| Yes, some things that were compiled to bytecode. |
|
|
| Report Abuse |
|
|
XNoBoomX
|
  |
| Joined: 08 May 2011 |
| Total Posts: 4731 |
|
|
| 23 Apr 2012 10:38 PM |
What more would be able to do with scripting?
~{An Intellectual In Love With Bacon}~ |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 24 Apr 2012 07:04 AM |
| ^ Low level memory handling? :D |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 09:07 AM |
What does 'low level memory handling' actually mean?
"Knowledge talks, wisdom listens." |
|
|
| Report Abuse |
|
|
MacGod
|
  |
| Joined: 16 Apr 2012 |
| Total Posts: 114 |
|
|
| 24 Apr 2012 09:11 AM |
*Sips Sorcus' coffee break coffee with a smirk*
Sup.
-expro |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 10:14 AM |
getfenv and setfenv.
You can no longer get things like the calling environment, and they've been replaced with the most stupid feature ever: goto.
Now you can make uglier code than ever! No more getfenv to make it cleaner, and more goto to make it uglier.
Fantastic. |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 24 Apr 2012 10:57 AM |
"You can no longer get things like the calling environment, and they've been replaced with the most stupid feature ever: goto."
>implying gotos are a direct replacement of get/setfenv
Also, _ENV, which is cleaner than get/setfenv anyway. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 11:09 AM |
"_ENV, which is cleaner than get/setfenv anyway."
It's the only notable feature added other than those bitwise operators which are just as useless IMO
There's no equivalent for getfenv(2)
No offense but this:
fetchIntoScope()
is much cleaner than this:
fetchIntoScope(_ENV) |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 24 Apr 2012 11:27 AM |
Something that people might want to know about `_ENV`:
In 5.1, you can do this:
function callWithEnv(f, env, ...) local e = getfenv(f) setfenv(f, env) results = {f(...)} setfenv(f, e) return unpack(results) end
The equivalent in 5.2 is:
function callWithEnv(f, env, ...) _ENV = env return f(...) end
So in some senses, this _is_ much cleaner
WRT `getfenv(2)`, that's a pretty nasty thing to do anyway. At least by passing _ENV as an argument it becomes clear that your environment can become compromised. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 24 Apr 2012 12:06 PM |
| Wait...5.2 is already out? I thought it was in beta...or have they released it now? |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 24 Apr 2012 03:12 PM |
@Oysi
Yeah and how likely is that situation ever to arise?
I've been programming stuff for like 3 years minimum and never encountered a situation where I would need to do that, other than perhaps one or two.
And I know they're not related, I'm just saying: The only reason to update really is the goto and bitwise, and to get those we're sacrificing the entire functionality of multiple environment manipulation without ugly "_ENV" hax. |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 24 Apr 2012 03:40 PM |
The only thing that will have to be changed is script builders and stuff that uses bytecode encoding in order to obfuscate itself.
Other than that I can't think of anything that would need to be changed. Also, with 5.2 there's some stuff that will be possible that wasn't feasible to do before, such as implementations of real encryption and compression algorithms which would have been too slow before, which will be interesting. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 03:47 PM |
| Well I suppose bitwise has SOME advantages (Hashing?) |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 24 Apr 2012 03:51 PM |
| Bitwise = can has efficiency + memory hax plz. :3 |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 24 Apr 2012 03:52 PM |
| What would be better, a Goto + Goto call or a function and a function call? |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 03:54 PM |
"What would be better, a Goto + Goto call or a function and a function call?"
That is exactly the reason why goto is so evil.
People consider replacing functions with it. Even the consideration of that fact makes it evil.
It has it's uses, but they're so far and wide, and so easily replaced by something else, I just think it's pointless updating.
They should have at least left get/setfenv in for legacy purposes. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 24 Apr 2012 03:56 PM |
| Pretty much any hashing + encryption + compression is best done with heavy use of bitwise operations. If you're wondering, reason for this is that bitwise ops let you pack a lot more unique independent operations into a single instruction than normal arithmetic operations, which only give you a single independent operation. |
|
|
| Report Abuse |
|
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 24 Apr 2012 03:57 PM |
| Nuking logic with logic isn't that like....MIND BLASMPHY |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2012 03:58 PM |
"Having the ability to set the environment of any function, is actually pretty ridiculous."
I don't really care about that. I don't think anyone does really for legitimate purposes.
But I use(d) getfenv(2). A lot.
It's so much cleaner to be able to do something like:
class "SomeName" new "SomeName" "InstanceName" InstanceName:function()
In my opinion, instead of:
class("SomeName", _ENV) new("SomeName", "InstanceName", _ENV) InstanceName:function()
You could always return values but that's less clean and stuff |
|
|
| Report Abuse |
|
|