Hacker News new | ask | show | jobs
by zokier 1940 days ago
The magic thing that powershell has is that its objects are full .net objects so you can do method calls etc and not just structured data, so you can do stuff like

    Get-Foo | % { $_.bar() }
Which is roughly equivalent to e.g. python

    map(lambda x: x.bar(), getFoo())
Does murex have anything like that? Generally serializing objects (with methods) is to byte streams is not trivial nor without tradeoffs
1 comments

Not directly but you can execute code dynamically. eg

    Get-Foo | [ bar ] | source
would be the equivalent murex code.

PowerShell is definitely more sophisticated here because .bar is recognised as a method. Whereas in murex it's just a text field that you're asking the interpreter to execute as code.