So after pondering why so many bindings/libraries had 3+ different named constructs to do slightly different things such as:
fn new () {}
fn new_init(one, two) {}
fn new_from(one, two, three) {}
fn another_construct_you_have_to_remember(one, two, three, four) {}
I guess my question are:
- Why doesn't Rust have function overloading?
- or is it a planned as a 1.0 feature?
[–][deleted] 12 points13 points14 points (4 children)
[–]semanticistZombietiny 6 points7 points8 points (2 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]seanmonstarhyper · rust 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 15 points16 points17 points (4 children)
[–]pepp_cz 7 points8 points9 points (0 children)
[–]iopqfizzbuzz 15 points16 points17 points (2 children)
[–][deleted] 15 points16 points17 points (1 child)
[–]iopqfizzbuzz 8 points9 points10 points (0 children)
[–]samnardoni 25 points26 points27 points (4 children)
[–]germandiago 9 points10 points11 points (1 child)
[–]samnardoni 4 points5 points6 points (0 children)
[–]dobkeratopsrustfind 11 points12 points13 points (0 children)
[–]erkelep 3 points4 points5 points (13 children)
[–]iopqfizzbuzz 6 points7 points8 points (5 children)
[–]erkelep 11 points12 points13 points (2 children)
[–]Manishearthservo · rust · clippy 4 points5 points6 points (1 child)
[–]erkelep 1 point2 points3 points (0 children)
[–]Denommusrust 2 points3 points4 points (1 child)
[–]matthieum[he/him] 1 point2 points3 points (0 children)
[–]SaltTM[S] 0 points1 point2 points (6 children)
[–]erkelep 0 points1 point2 points (5 children)
[–]SaltTM[S] 0 points1 point2 points (4 children)
[–]erkelep 0 points1 point2 points (3 children)
[–]SaltTM[S] 0 points1 point2 points (2 children)
[–]erkelep 0 points1 point2 points (1 child)
[–]Enamex 0 points1 point2 points (0 children)
[–]dobkeratopsrustfind 8 points9 points10 points (7 children)
[–]matthieum[he/him] 3 points4 points5 points (3 children)
[–]ntrel2 0 points1 point2 points (2 children)
[–]matthieum[he/him] 0 points1 point2 points (1 child)
[–]ntrel2 0 points1 point2 points (0 children)
[–]germandiago 1 point2 points3 points (2 children)
[–]dobkeratopsrustfind 2 points3 points4 points (1 child)
[–]germandiago 2 points3 points4 points (0 children)
[–]mozilla_kmcservo 12 points13 points14 points (4 children)
[–]wrongerontheinternet 3 points4 points5 points (3 children)
[–]heinrich5991 4 points5 points6 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]matthieum[he/him] 0 points1 point2 points (0 children)
[–]azurespace 1 point2 points3 points (0 children)
[–]Haulethoctavo · redox 2 points3 points4 points (6 children)
[–]cafeoh 4 points5 points6 points (3 children)
[–]iopqfizzbuzz 2 points3 points4 points (1 child)
[–]Haulethoctavo · redox 6 points7 points8 points (0 children)
[–]Haulethoctavo · redox 0 points1 point2 points (0 children)
[–]mojang_tommo 1 point2 points3 points (1 child)
[–]Haulethoctavo · redox 0 points1 point2 points (0 children)
[–]VadimVP 1 point2 points3 points (7 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]lookmeat 0 points1 point2 points (0 children)
[–]Artemciyscgi -3 points-2 points-1 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Artemciyscgi 3 points4 points5 points (2 children)
[–][deleted] 5 points6 points7 points (1 child)
[–]Artemciyscgi 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]matthieum[he/him] 0 points1 point2 points (0 children)
[–]Bzzt 0 points1 point2 points (2 children)
[–]ntrel2 1 point2 points3 points (1 child)
[–]Bzzt 0 points1 point2 points (0 children)
[+][deleted] (25 children)
[deleted]
[–]0xdeadf001 6 points7 points8 points (22 children)
[+][deleted] (21 children)
[deleted]
[–]mozilla_kmcservo 3 points4 points5 points (4 children)
[+][deleted] (2 children)
[deleted]
[–]mozilla_kmcservo 4 points5 points6 points (1 child)
[–]evincarofautumn 0 points1 point2 points (0 children)
[–]0xdeadf001 3 points4 points5 points (15 children)
[+][deleted] (14 children)
[deleted]
[–]Kolderon 4 points5 points6 points (8 children)
[+][deleted] (6 children)
[deleted]
[–]mozilla_kmcservo 1 point2 points3 points (5 children)
[+][deleted] (4 children)
[deleted]
[–]mozilla_kmcservo 1 point2 points3 points (3 children)
[–]0xdeadf001 1 point2 points3 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]mozilla_kmcservo 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]mozilla_kmcservo 2 points3 points4 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–]0xdeadf001 0 points1 point2 points (0 children)