>> not to rely on a memory of a programmer It is more than that.
For instance, we can have list_vt_tally0 and list_vt_tally1. Based on the names, you can tell that the former one consumes the given linear list but the latter one does not. Say we have: #symload tally0 with llist_vt_tally0 #symload tally1 with llist_vt_tally1 Then the programmer can decide the lense of 'tally', that is, choose either tally0 or tally1. >> There is no enforcement from the compiler, am I got it right? :) Yes, it is just a naming convention right now. I suppose that we can write a checker to flag out function names that violate this convention. Kind of like grammar checking. On Friday, July 12, 2024 at 8:50:28 AM UTC-4 [email protected] wrote: > Hi everyone, > > so lense is a best practice of how to name functions to not to rely on a > memory of a programmer and to be able to tell what function accepts and > maybe consumes? There is no enforcement from the compiler, am I got it > right? :) > > чт, 11 июл. 2024 г. в 02:38, Vanessa McHale <[email protected]>: > >> Interesting! I think lenses have popped up in the context of machine >> learning, where information “flows up” >> >> ieeexplore.ieee.org >> <https://ieeexplore.ieee.org/abstract/document/8785665> >> <https://ieeexplore.ieee.org/abstract/document/8785665> >> <https://ieeexplore.ieee.org/abstract/document/8785665> >> >> The notion of information/discarding information is present in linear >> logic, quite eager to see how this pans out! >> >> Cheers, >> Vanessa McHale >> >> On Jul 7, 2024, at 12:50 PM, gmhwxi <[email protected]> wrote: >> >> Yes, it is lense (not lens). >> >> "Lense" is word I coined that means something kind of related to >> the notion of 'tense' in grammar. >> >> (I tried 'linse' but settled on 'lense'). >> >> If the lense of a verb is '1', then the verb maintains its object. >> If the lense of a verb is '0', then the verb consumes its object. >> >> The typical word whose lense is 0 is 'free' (as in freeing an object). >> And the typical word whose lense is 1 is 'copy'. >> >> In ATS3 library, the name of a function should, by convention, indicate >> explicitly the lense of the verb contained in the name. >> >> Cheers, >> >> --Hongwei >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ats-lang-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ats-lang-users/1abd3417-527d-4afb-a8e4-5b9e05d025bfn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ats-lang-users/1abd3417-527d-4afb-a8e4-5b9e05d025bfn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ats-lang-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/ats-lang-users/E366AD08-6EB7-4645-A5C1-B2F48D93D31A%40gmail.com >> >> <https://groups.google.com/d/msgid/ats-lang-users/E366AD08-6EB7-4645-A5C1-B2F48D93D31A%40gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "ats-lang-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/e606013b-2bde-46a6-a1b2-36301fdd0c96n%40googlegroups.com.
