|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Invisible wrote:
> 
> Now, just imagine if Excel would use Haskell instead of VB - you could 
> use the same language for the cell formulas and the macros! :-D
> 
Actually I'd say you can do that with VBA too. Just create a function 
that passes the input to VBA translator.
-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethis zbxt  net  invalidPost a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | >> Now, just imagine if Excel would use Haskell instead of VB - you could 
>> use the same language for the cell formulas and the macros! :-D
>>
> 
> Actually I'd say you can do that with VBA too. Just create a function 
> that passes the input to VBA translator.
Right. And what non-trivial operations can you perform with a snippet of 
VBA small enough to resonably fit into a single cell?
Yeah, exactly.
-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Invisible wrote:
> 
> Right. And what non-trivial operations can you perform with a snippet of 
> VBA small enough to resonably fit into a single cell?
Depends on A) what you're doing and B) what functions for VBA you have 
pre-made. Would the 1024 (oslt) char limit on Excel cell would be 
seriously more usable with plain Haskell?
> Yeah, exactly.
-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethis zbxt  net  invalidPost a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | >> Right. And what non-trivial operations can you perform with a snippet 
>> of VBA small enough to resonably fit into a single cell?
> 
> Depends on A) what you're doing and B) what functions for VBA you have 
> pre-made. Would the 1024 (oslt) char limit on Excel cell would be 
> seriously more usable with plain Haskell?
Well let's put it this way. If you wanted to calculate the geometric 
mean (assuming there isn't already a function for that), in VBA you'd 
have to write an explicit FOR loop (with initialisation, update, etc.), 
whereas in Haskell you'd just keep a "map" call... It's a 1-liner.
-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Invisible wrote:
>>
>> Depends on A) what you're doing and B) what functions for VBA you have 
>> pre-made. Would the 1024 (oslt) char limit on Excel cell would be 
>> seriously more usable with plain Haskell?
> 
> Well let's put it this way. If you wanted to calculate the geometric 
> mean (assuming there isn't already a function for that), in VBA you'd 
> have to write an explicit FOR loop (with initialisation, update, etc.), 
> whereas in Haskell you'd just keep a "map" call... It's a 1-liner.
> 
Meaning that you have pre-done function/call for it in Haskell (no, it 
doesn't have to be self-made, it just is implemented earlier, usually 
since someone has needed it).
-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethis zbxt  net  invalidPost a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | >> Well let's put it this way. If you wanted to calculate the geometric 
>> mean (assuming there isn't already a function for that), in VBA you'd 
>> have to write an explicit FOR loop (with initialisation, update, 
>> etc.), whereas in Haskell you'd just keep a "map" call... It's a 1-liner.
>>
> 
> Meaning that you have pre-done function/call for it in Haskell (no, it 
> doesn't have to be self-made, it just is implemented earlier, usually 
> since someone has needed it).
The point being that it is *possible* to define the "map" function in 
Haskell, whereas such a function cannot be defined in VBA. :-P
-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Invisible wrote:
> in VBA you'd have to write an explicit FOR loop 
Not in Excel. What are you smoking? :-)
-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."
Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Orchid XP v7 wrote:
> 
> The point being that it is *possible* to define the "map" function in 
> Haskell, whereas such a function cannot be defined in VBA. :-P
> 
Umm.. I'm not getting this - why is it impossible to define in VBA?
-- 
Eero "Aero" Ahonen
    http://www.zbxt.net
       aer### [at] removethis zbxt  net  invalidPost a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | >> The point being that it is *possible* to define the "map" function in 
>> Haskell, whereas such a function cannot be defined in VBA. :-P
>>
> 
> Umm.. I'm not getting this - why is it impossible to define in VBA?
Because in VBA, you can't pass functions as arguments to functions.
-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
 Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  | 
|  |  | 
|  |  | Orchid XP v7 wrote:
>>> The point being that it is *possible* to define the "map" function in 
>>> Haskell, whereas such a function cannot be defined in VBA. :-P
>>>
>>
>> Umm.. I'm not getting this - why is it impossible to define in VBA?
> 
> Because in VBA, you can't pass functions as arguments to functions.
Oh, right. I bet there's *some* way to get the equivalent of function 
pointers, but I don't know VBA well enough offhand...
Actually, you can. It just takes more work. You have to do it the way 
you'd do in (say) java, and make a com object with the functionaltiy you 
need. Perhaps overkill, yes.
-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."
Post a reply to this message
 |  | 
|  |  | 
|  |  | 
|  |  |  |  | 
|  |  |