Talk:Letter frequency: Difference between revisions
m
→AppleScript functionally composed variant
(2 intermediate revisions by the same user not shown) | |||
Line 139:
::: To quote from the landing page, the idea is not only ''to demonstrate how languages are similar and different'' but also to ''aid a person with a grounding in one approach to a problem in learning another'',
::: So the more we disagree, the more useful material and revealing comparisons we can generate :-)
::: No amount of iterative programming with sequence branches and loops, even for fifty years, will ever introduce us to even the basics of maps, folds,
:::The only really useful commentary is, however, just an alternative draft.
::: As Knuth famously puts it, ''premature optimization is the root of all evil'', but if I did want something faster for macOS scripting, my comment on your AppleScript draft would probably just be the JavaScript ES6 draft (on this page) which uses the macOS Automation library for the file access.
::: (Just a few lines of unoptimized new code, and on this system it gives counts for each distinct character in the text of ''les Miserables'' in well under a second. I would feel ashamed of myself if I wasted any time on thoughts of further optimizing that :-)
::: Keep well, and enjoy the coding ! [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 18:17, 14 April 2020 (UTC)
|