7 ms·
Microsoft: Hey, we have this new feature. It's called Macros. You can execute any code you like and use it as functions in your spreadsheets. Users: Great! Let
by jtsuken 6y ago
Microsoft: Hey, we have this new feature. It's called Macros. You can execute any code you like and use it as functions in your spreadsheets.
Users: Great! Let's start using it everywhere!
Users: Hey! Our spreadsheets have become very slow and hackers break into our systems by executing arbitrary code in our spreadsheets
Microsoft: OK! From now on you will have to save workbooks that can execute arbitrary code in a dedicated file format, which will only open after showing 15 warning messages.
....
Microsoft: _Hey, we have this new feature. It's called Lambda. You can execute any code you like and use it as functions in your spreadsheets._
- layer8 6y agoThe problem with “macros” is that they can be arbitrary VBA code that can invoke OS functions and foreign applications. Lambdas can only invoke Excel functions that you can invoke anyway from any Excel cell. Lambdas merely add an abstraction mechanism, they otherwise don’t provide access to new functionality.
- samfisher83 6y agoThis is what they said: new capability that will revolutionize how you build formulas in Excel Which isn't really true. I can call macros using the =function(x) capability like forever.
- layer8 6y agoMacros are not “formulas in Excel”, lambdas are.
- Closi 6y agoThe differences seem to be: * You can write it in one language (excel formula language) * The language is simpler and known by almost all users, while Javascript and VBA are only used by a tiny proportion of users. * The language is more secure (i.e. you can't execute arbitrary code, access files, call DLLs etc) * Because of the above, users don't need any security permissions / get warnings when running it. * Because they are standard excel formulas, you get OOTB support for other excel features such as dynamic array formulas and access to the full catalogue of worksheet functions (even in VBA, Application.Worksheet only had access to a few basic excel workbook functions, so if you wanted to do a Xlookup for example you are implementing it yourself with arrays and loops)
- fomine3 6y agoYes it's good but "revolutionize" is misleading.
- Closi 6y agoI don’t think it’s misleading, I mean everyone’s definition of “revolutionary” is different, but let’s put it into perspective: this is adding functions and recursion to one of the worlds most popular data analysis languages. I think most people on this site know how powerful the concepts of functions and recursion can be!
- fomine3 6y agoFunctions and recursion is already there, but only with VBA. I'll say revolutionize if VBA wasn't exist.
- slowwriter 6y agoAdding to what others have replied, the difference is simply put: If you can write your custom function as a lambda instead of a VBA function you will not have to save your Workbook as XLSM (M for Macro). That means no warnings when the user opens it and much better security because the lambdas can only call built-in functions and other lambdas. To be honest, I think this is awesome and has been sorely missed.
- wtvanhest 6y agoIt’s absolutely true. Most spreadsheets in BigCo are viewed by at least 3 or 4 people. No one likes it when they open a spreadsheet from someone else with a macro because it dramatically increases the learning curve. If you just had custom functions, you can trace them back pretty quickly and end up with an understanding. Teams will also probably create ‘known’ custom functions for their use case, like converting account Chart of Account codes to finance COA codes etc.
- infogulch 6y agoIt seems obvious to me why "VBA in a cell" is a nonstarter and why making this a formula-level feature is necessary. I'm glad macros have worked for whatever use case in the past, but it can never be a capital-f Feature of excel because it's a security nightmare and microsoft and everyone that uses macros knows this (or should). If you want a platform to succeed, make it capable of satisfying most users needs within its sandbox; using macros is just giving up and working around it.
- tzm 6y agoAllow me to reminisce.. in 2012 I created a JavaScript VM extension that executes custom functions inside native Excel. The extension also had a corresponding web-based front-end for creating apps that read/write directly to Excel. This was my baby, but investors (ie, YC) didn't think it was disruptive enough. Now I see these apps (ie, AirTable) pop up every month. Should I open source it?
- xupybd 6y agoIf you open source it you can't sell it. If you couldn't sell it anyway you might be able to make some money supporting it as open source.
- nullsense 6y agoI like how Lambda means very different things between AWS and Microsoft. "Let's just create a Lambda for this" Ok... But which one?
- pearjuice 6y agoI don't want to be cynical, but they could have done this with reason. They could have also called it functions or methods. But chose to disrupt search results for a competitor.
- listenallyall 6y agoYour anti-M$FT bias is showing. AMZN struck first... Microsoft was using the term Lambda for a prominent feature in its flagship language (C#) before AWS ever existed. Here's a Stack question dated 2008: https://stackoverflow.com/questions/167343/c-sharp-lambda-expressions-why-should-i-use-them https://stackoverflow.com/questions/167343/c-sharp-lambda-ex...
- pearjuice 6y agoEye for an eye then. :-) For someone claiming I'm anti-MS, funny you use the mocking M$FT abbreviation.
- avandvrnot 6y agoThis would be pretty great if available on Azure Stack on prem.