AutoHotkey Community

It is currently May 27th, 2012, 12:55 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Lambda!! We need Lambda!
PostPosted: September 7th, 2011, 11:37 pm 
Offline

Joined: August 14th, 2011, 8:31 pm
Posts: 69
Location: Nova Scotia, Canada
I was coding a new program the other day, it was something I had made in C++ durring my early days... Thats how I have been learning AHK.. By redoing the 500 or so small C++ programs I built.

So I was coding along, I go to compile and Oh... My... God...

Code:
D:\Code\AHK\Projects\French Keys\Altchar.ahk (93) : ==> Functions cannot contain functions.


Waa. but. and. the. they. its. no?. it. but.....

WHAT?!?!?!!?

( ^^ actually what i said .... )

Autohotkey doesn't support Functions with functions?! A.K.A. Lambda

Please please please implement this! It is a staple of my personal coding style as I obey the UNIX philosophy...

which is (in my own words): One small program for one general job. In opposition to one big program to do one specific job, just string the little ones together

.... It is a staple for me to make one function do one job, one sub routine do one job. Then I can string them together in fun and complex ways to create new an interesting hot keys without writing big-butt functions!


So please, implement it :) I can help you if you like... (C++ dev... busy working on my teams website right now... So I can't say I'll be able to help much )

_________________
ImageImage


Twitter: http://twitter.com/NictraSavios
Tumblr: http://nictrasavios.tumblr.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 3:13 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
You are entirely missing the point. Your error is the result of a mismatched curly brace. Funtions can of course CALL other functions. And then we have classes...
so fix your curly braces and then we can talk about lambda

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 3:25 am 
Offline

Joined: July 6th, 2011, 5:37 pm
Posts: 214
Location: Looking over my domain
Nimda
Many languages allow function definitions within functions. Currently I beleive this is still disallowed in ahk. altho I have not been watching the latest v2 beta discussions I know it was intended at some point to allow this

_________________
Image Stolen from SKAN


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2011, 3:40 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7503
Location: Australia
Functions-in-functions would provide minimal benefit without closures, which are not feasible with the current architecture. Furthermore, lambda provides a particular way of defining an anonymous function or closure, and is not comparable to simply defining a function inside another function.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group