I don’t think it’s likely that any changes are going to be made regarding the 
use of “end” in the language. I’d say this is one element of the language 
design that’s probably settled into its final state already.

 — John

On May 9, 2014, at 7:07 AM, Rayan Ivaturi <[email protected]> wrote:

> How about having end as a function to make the code look clean when there are 
> many blocks and 'end'up with a series of  continuous end statements?
>  
> Consider the following piece of code for  looping to create a term-frequency 
> dictionary (quoted from http://randyzwitch.com/julia-language-beginners/)
>  
> term_freq=Dict{String, Int64}()
> for word in english_dictionary
>     for url in url_list
>         if search(line, word) != (0:-1)
>             term_freq[word]=get(term_freq,word,0)+1
>         end
>     end
> end
>  
> If this can be written as the below snippet by making end as function with 
> argument as number, which matches the 2 for loops and one if statement? Might 
> look more clean.
>  
> term_freq=Dict{String, Int64}()
> for word in english_dictionary
>     for url in url_list
>         if search(line, word) != (0:-1)
>             term_freq[word]=get(term_freq,word,0)+1        
> end(3)
>  
> of course, this particular use case applies only when there is a continuous 
> series of end statements only...

Reply via email to